Huge crowds chanting "You are not alone" cheered Andres Manuel Lopez Obrador, runner-up in the July 2 election by a fraction, on a march through the capital to the Zocalo square.
The size of the protest, far bigger than a similar demonstration last week, gave Lopez Obrador a lift in his attempt to persuade an election court to declare him winner.
"We are going to start peaceful civil resistance to defend democracy," Lopez Obrador told supporters who had travelled from around the country to attend the event.
Lopez Obrador, a former Indian welfare officer, said aides would meet this week to work out what form the resistance would take. The official result showed that the conservative ruling party candidate, Felipe Calderon, won by less than a percentage point, or just over 240,000 votes.
The race divided Mexico only six years after Vicente Fox, the president, ended 71 years of one-party rule. Friction over fraud allegations has raised fears of political gridlock and even violence in a key US ally in Latin America.
Calderon won by less than one per
cent point or by 240,000 votes
A court is investigating complaints by Lopez Obrador, the former mayor of Mexico City, that electoral officials altered the vote count to favour Calderon. European Union observers say there was no significant fraud.
Lopez Obrador did not say what kind of civil resistance he envisaged. But as a local politician in the state of Tabasco in the 1990s he blocked oil wells and encouraged tens of thousands of people not to pay energy bills to protest at alleged vote fraud and environmental damage by the Pemex oil company.
Despite Lopez Obrador's ability to put supporters on the streets, an opinion poll on Saturday showed that most Mexicans do not agree with his call for a vote-for-vote recount. A recount of tally sheets has already confirmed Calderon as the winner.
'Sad, angry and impotent'
Lopez Obrador also said Fox's government illegally backed Calderon, its Harvard-educated former energy minister.
Lopez Obrador is projected as the
champion of the poor
One demonstrator, Salvador Torres, said: "I feel sad, angry and impotent because the people's will was not respected."
Protesters, many dressed in the yellow of Lopez Obrador's Party of the Democratic Revolution, or PRD, set off firecrackers near the US embassy and a large international hotel.
People packed the Zocalo, once the centre of the Aztec empire and now the heart of modern Mexico, and filled surrounding streets for several blocks. The square holds well over 100,000 people for concerts.
The court must rule on the fraud claims and then declare a president-elect by early September. Legal deliberations are likely to take weeks and be highly technical. Lopez Obrador asked his followers to hold another mass rally in the capital on July 30 to keep the focus on his cause.
"People are really angry. We're not just going to go home. We're going to keep going until he is declared president"
Francisco Benavides, a farmer
His supporters streamed into the capital from all over Mexico to back Lopez Obrador, known as Amlo from his initials. An austere widower, he vows to take millions of Mexicans out of poverty.
Five people carrying yellow PRD flags rode horses through the Spanish colonial city centre toward the rally.
A youth dressed in a black Che Guevara T-shirt carried a banner of the Virgin of Guadalupe, Mexico's most revered religious icon, reading: "The mother of Mexico is with Amlo."
Francisco Benavides, a farmer from the state of Morelos, said: "People are really angry. We're not just going to go home. We're going to keep going until he is declared president."