Mexico’s Senate has approved a controversial judicial reform under which judges will be elected by popular vote.
Its supporters say the changes will make judges more accountable to the Mexican people but critics argue it undermines the country’s system of checks and balances and will strengthen the power of the governing Morena party.
The bill has triggered protests and strikes with demonstrators breaking into the building where the vote was taking place.
The Senate vote was the last major hurdle the legislation, which has the backing of President Andrés Manuel López Obrador, faced.
During a dramatic late-night session, an opposition senator broke ranks and voted in favour of the reform, meaning it had the two-thirds majority needed for constitutional change.
There will be further debate on points raised by lawmakers on details of the bill before it is given its final approval but the general vote on Wednesday morning was the key one.
Its approval is a victory for President López Obrador, whose term is coming to an end on 30 September.
The outgoing president had thrown his weight behind the reform after repeatedly clashing with Mexico’s Supreme Court, which during his six-year term has blocked some of his proposed changes in the energy and security sector.
Under the new system, Supreme Court justices will have to stand for popular election.