Hundreds of thousands of people marched through the streets of this capital on Sunday to protest a legal battle that could force its leftist mayor from office and ruin his chances of running for president.
Mayor Andres Manuel Lopez Obrador, 50, a leader of the opposition Democratic Revolutionary Party, marched with supporters to the Zocalo, the city's central plaza.
He delivered a defiant speech, urging this country's bitterly divided political forces to unite behind a plan to combat corruption and poverty.
"We are not going to be beaten," Lopez told the crowd, estimated by the police at 200,000. "No matter what happens, I am going to continue fighting for my principles."
In the four years since Lopez became mayor of the most populous city in the Americas, with 18 million people, he has become Mexico's most popular politician, with polls consistently showing him as the leading contender to succeed President Vicente Fox in 2006.
Lopez has won broad support, from Mexico's wealthiest business leaders to its poorest street vendors, for revitalizing the city's crumbling historic center, expanding clogged freeways and providing monthly payments to people over 70.
In recent months, however, he has been besieged by scandal. In March, hidden cameras recorded one of his principal political operators, Rene Bejarano, accepting wads of cash from a businessman seeking city construction contracts.
Lopez's former finance minister has been accused of using public money for lavish gambling trips to Las Vegas.
Now, the Mexican Congress, dominated by opponents of Lopez, is considering a vote to impeach him and strip him of his official immunity from prosecution to face charges that his government ignored a court order to stop construction of a public road on private property.
Lopez said the legal challenge and the videos were part of a conspiracy led by Fox to destroy his chances of winning the presidency. If he faces criminal charges, he will be barred from running for office.
In his speech, Lopez insisted that he had not broken the law. But he argued that the charges against him were too petty a reason to remove a mayor from office.
Even many who do not support Lopez say that prohibiting him from running for president on a legal technicality could further disillusion the Mexican electorate and undermine the country's young democracy.
Many demonstrators on Sunday wore stickers that read, "Say what you want, I am with Lopez Obrador." One banner read, "If it's war they want, we will give them war."
"We are the voice of the people," said Graciela Alcaraz, 83. "And we are here to support Lopez Obrador because he is the only political leader who worries that people like us have something decent to eat."
Still, it was clear that the scandals had hurt his popularity and plunged his party into its worst crisis.
Critics and supporters alike said that the mayor had performed poorly under the pressure.
They say he has isolated himself from his Cabinet and closest advisers, showing an increasingly authoritarian political style.