Mexico’s Congress voted to grant the country’s cleaners, cooks, babysitters, gardeners, caretakers and other domestic workers basic labor rights like limited work hours and paid vacations on Tuesday, in a momentous victory for a historically disenfranchised part of society.

The new legislation will benefit more than two million people — most of them impoverished women — who until now were not recognized as part of the formal labor market, with its benefits and protections.

The bill was approved unanimously by the Mexican Senate on Tuesday, after the Chamber of Deputies, the lower house, also passed it unanimously on April 30.

Congress is controlled by allies of President Andrés Manuel López Obrador, who was elected last year on promises that he would defend workers, combat inequality and lift up the poor.