How does enforcement of labor regulations shape the labor market effects of trade? Does the informal sector introduce greater de facto flexibility, reducing employment losses during bad times? To tackle these questions, we exploit local economic shocks generated by trade liberalization and variation in enforcement capacity across local labor markets in Brazil. In the aftermath of the trade opening, regions with stricter enforcement observed: (i) lower informality effects; (ii) larger losses in overall em-ployment; and (iii) greater reductions in the number of formal plants. Regions with weaker enforcement observed opposite effects. All these effects are concentrated on low-skill workers. Our results indicate that greater de facto labor market flexibility introduced by informality allows both formal firms and low-skill workers to cope better with adverse labor market shocks.