Controversial proposals by Mexico's outgoing president to allow voters to elect judges face a final hurdle in Congress against a backdrop of opposition street protests, diplomatic tensions and investor jitters.
Lawmakers in the upper house, the Senate, are due to discuss President Andres Manuel Lopez Obrador's judicial reform plan on Tuesday before a vote that could take place the same or next day.
The leftist leader, who will be replaced by his close ally Claudia Sheinbaum on October 1, argues that the courts serve the interests of the political and economic elite, calling the judiciary "rotten" and corrupt.
The bill was passed last week in the lower house by ruling party lawmakers and their allies, who were forced to gather in a sports center as protesters blocked access to Congress.
In the upper house, the ruling coalition is one seat short of 86 votes for a two-thirds majority needed to amend the constitution, although Senate majority leader Gerardo Fernandez Norona has suggested that 85 would be enough.
Opposition parties have vowed to vote against the proposals.
"We will fight and resist the destructive judicial reform," the conservative National Action Party wrote on social media platform X.
Thousands of people including court employees and law students protested in Mexico City on Sunday against the plan, under which even Supreme Court judges would be chosen by popular vote.
In an unusual public warning, Supreme Court chief justice Norma Pina warned that elected judges could be more vulnerable to pressure from criminal groups.
"The demolition of the judiciary is not the way forward," she said.
Pina said last week that the top court would discuss whether it has jurisdiction to halt the reforms, though Lopez Obrador has said there is no legal basis for it to do so.
The United States, Mexico's main trading partner, has warned that the reforms would threaten a relationship that relies on investor confidence in the Mexican legal framework.
The changes could pose "a major risk" to Mexican democracy and enable criminals to exploit "politically motivated and inexperienced judges," US Ambassador Ken Salazar said last month.
Margaret Satterthwaite, United Nations special rapporteur on the independence of judges and lawyers, has also voiced "deep concerns" about the plan.
"Access to an independent and impartial judiciary is a human right essential for protecting rights and checking power abuses," she wrote on X.
"While judicial elections are sometimes presented as enhancing democracy, they risk prioritizing politics over merit. Additionally, the sudden removal of many judges could delay justice and undermine the right to a fair trial," she added.
Human Rights Watch has urged lawmakers to reject what it called the "dangerous proposals," saying they would "seriously undermine judicial independence and contravene international human rights standards."
Financial market analysts say investor concerns about the reforms have contributed to a sharp fall in the value of the Mexican currency, the peso, which hit a two-year low against the dollar last week.