This paper combines a new database on non-tariff measures (NTMs) with Morocco’s firm census to explore the effect of regulatory harmonization with the E.U. on firm-level outcomes. Exploiting cross-sectoral variation in the timing and extent of regulatory harmonization, we find that harmonization waves correlate with rises in labor productivity and with higher markups, allowing self-financing of the adaptation process at the firm level. We identify an induced market-structure change that made the observed rise in markups possible. Namely, harmonization temporarily sheltered the Moroccan market from competition from low-end producers in other developing countries, who took time to adapt. We identified this effect through changes in both trade patterns and firm-level outcomes. Thus, harmonization apparently generated a self-financing adaptation process by affecting both firm-level incentives and market structure.Keywords : Morocco, Trade, Non-Tariff Measures, Firms, Harmonization, Profit, Productivity