Huge rallies have been held in several Mexican cities against what protesters say are government attempts to undermine the electoral authorities.
The biggest was in Mexico City, where organisers say 500,000 people marched on the city’s main plaza. The local government put the number at 90,000.
Lawmakers last week voted to slash the budget of the National Electoral Institute (INE) and cut its staffing.
President Andrés Manuel López Obrador accuses the INE of being partisan.
But opponents describe the recent vote as an attack on democracy itself, pressing the Supreme Court to overturn them as unconstitutional.
On Sunday, massive crowds gathered in Mexico City’s historic Zocalo Square. The demonstrators spilled out into adjoining streets in the city centre.
“We’re fighting to defend our democracy,” protester Veronica Echevarria was quoted as saying by Reuters. She was wearing a cap emblazoned with the words “Hands off the INE”. Many demonstrators carried cards with a similar slogan.
Smaller peaceful demonstrations were staged in several other cities.
Mexico’s Senate approved the reforms on Wednesday, following a similar vote in the lower chamber of parliament. The reforms will come into force once they are signed by President López Obrador.
The BBC’s Mexico correspondent, Will Grant, says it is perhaps the most polemic political issue in Mexico at present.
Mr López Obrador, who was elected in July 2018 after two previous failed attempts, has long been critical of the INE, whose staff oversee elections.
Last month, he accusing the independent body of cheating, and said its staff turned a blind eye to “the stuffing of ballot boxes, falsification of [election] records and vote buying”.
In his first attempt at becoming president, in 2006, he lost to his conservative rival Felipe Calderón by less than one percentage point. For months, Mr López Obrador refused to recognise the result, which he denounced as fraudulent.
He also challenged the result of the 2012 election, when he lost to Enrique Peña Nieto.
Since his win in 2018, Mr López Obrador has been pushing for a reform of the INE, which he says will save taxpayers $150m (£125m) a year by drastically reducing the agency’s staff.