Updated

Mexico's Senate overwhelmingly passed a sweeping reform of the notoriously dysfunctional public school system early Wednesday, handing President Enrique Pena Nieto an important victory in his push to remake some of his country's worst-run institutions.

The Senate voted 102-22 in favor of a standardized system of test-based hiring and promotion that would give the government the tools to break teachers' unions' near-total control of school staffing.

That control includes the corrupt sale and inheritance of teaching jobs and it has been widely blamed for much of the poor performance of Mexican schools, which have higher relative costs and worse results than any other in the 34-nation Organization for Economic Cooperation and Development.

"The inheritance and sale of jobs has ended," Education Secretary Emilio Chauyffet said on Twitter.