Mexico’s highest court on Thursday struck down a key piece of a sweeping electoral bill backed by the president that would have undermined the agency that oversees the country’s vote, and that helped shift the nation away from single-party rule.
The ruling by the Supreme Court is a major blow to President Andrés Manuel López Obrador, who has argued that the plan would make elections more efficient, save millions of dollars and allow Mexicans living abroad to vote online.
The election measures were passed early this year by Congress, which is controlled by the president’s party, and would have applied to next year’s presidential race. Though Mr. López Obrador is barred from seeking re-election, his party’s chosen candidate will most likely be a heavy favorite.
The bill would have slashed the National Electoral Institute’s work force, reduced its autonomy and curbed its power to punish politicians for violating election laws. Civil liberty groups said the measures would have hobbled a key pillar of Mexican democracy.
“What it sought was to transform the entire electoral system,” said Ernesto Guerra, a political analyst based in Mexico City. “It was a 180-degree turn to the rules of the democratic game.”
However relieved some Mexicans were by the ruling, some also worried that Mr. López Obrador might try to turn the legal setback to his advantage and rally his base around the idea that the judiciary is corrupt. During a morning address Thursday in which he anticipated the ruling, he lit into the court.
“It is an invasion, an intrusion,” Mr. López Obrador said.
He said he would present an initiative “in due time” to have members of the judiciary elected just like the president or senators. “It should be the people who elect them,” he said. “They should not represent an elite.”
The court last month had invalidated another part of the bill that, among other things, involved changes to publicity rules in electoral campaigns.
In throwing out the remaining part of the bill by a vote of nine to two, justices pointed to violations by lawmakers of legislative procedure, saying that the changes had been rushed through in only four hours and that members of Congress had not been given reasonable time to know what they were voting on.
“As a whole, they are so serious that they violate the constitutional principles of Mexican democracy,” Justice Luis María Aguilar said during the court’s discussion. “Not respecting the rules of legislative procedure is constitutional disloyalty.”
José Ramón Cossío, a lawyer who is a former member of the court, said that Mr. López Obrador and his allies had pushed the changes known as “Plan B” forward “in such an arrogant, violent, rude way that they lost.”
Experts described the court’s decision as a major setback for the administration of Mr. López Obrador, who has made overhauling the electoral system a major priority.
The government had defended the changes as a needed step to “reduce the bureaucratic costs” of elections and to ensure that “no more frauds occur” in Mexico.
“The rule of law has never been threatened with the approval of the reforms,” the president’s legal adviser wrote in a statement in March. “It is false that the fundamental rights of the citizens are at risk.”
With Plan B struck down, next year’s elections will be governed by the same rules under which Mr. López Obrador and his party, Morena, came to power, Mr. Guerra said.
“This gives me peace of mind,” he said. “We see the burial of this reform emanating from and for the political power.”
But fears remain that the ruling may be weaponized against the judicial system, which already has come under attack by the president for rejecting a number of his administration’s initiatives, including one that would have transferred the newly created National Guard from civilian to military control. The court ruled that this was unconstitutional.
“This defeat was intentionally sought to properly assume the role of victim and erect the perfect enemy,” said Juan Jesús Garza Onofre, an expert in constitutional law and ethics at the National Autonomous University of Mexico. “Narratively, this defeat becomes more of a victory.”
The risk, analysts warn, is long-term damage to the judiciary. “Justice as we know it, with all its shortcomings, could experience a setback,” Mr. Garza Onofre said.
The president, he added, would be prudent “to cool heated tempers.”
“We know that is not going to happen,” he said.