This paper studies the effect of enforcing labor regulation in an economy with a dual labor market. The analysis uses data from Brazil, a country with a large informal sector and strict labor law, where enforcement affects mainly the degree of compliance with mandated benefits (severance pay and health and safety conditions) in the formal sector, and the registration of informal workers. The authors find that stricter enforcement leads to higher unemployment but lower income inequality. They also show that, at the top of the formal wage distribution, workers bear the cost of mandated benefits by receiving lower wages. Wage rigidity (due, say, to the minimum wage) prevents this downward adjustment at the bottom of the income distribution. As a result, formal sector jobs at the bottom of the wage distribution become more attractive, inducing the low-skilled self-employed to search for formal jobs.