Updated

Lawmakers stripped Mexico City's mayor of immunity from prosecution, clearing the way for criminal charges that his supporters say have been trumped up to keep the popular and left-leaning politician out of the presidential race.

In a defiant speech before a crowd of more than 100,000 cheering supporters, Mayor Andres Manuel Lopez Obrador (search) said Thursday he would go to jail if necessary, pledged to continue his bid for the presidency and said he was being persecuted for his efforts on behalf of the poor.

"I am proud to be accused, like those who struggled for justice in the past," Lopez Obrador told lawmakers in the Mexican Congress hours before they approved the impeachment-like bill on a 360-to-127, party-line vote.

Echoing Cuban President Fidel Castro's (search) "History will absolve me" speech, he defiantly told legislators, "today, you are judging me, but don't forget that later history will judge both of us." He stalked out of the Congress building immediately after finishing his speech.

The seemingly shaky legal case against Lopez Obrador alleges that in 2001, the city government failed for 11 months to obey a court order to vacate contested land that it had expropriated for the purpose of building a road.

However, the violation is considered minor, and the city eventually complied — and it is not clear the mayor personally made any decisions in the case. Lopez Obrador denies he violated the law, and said the charges were a plot by President Vicente Fox (search) to knock him out of a race that he leads in the polls. Fox has denied that allegation.

Interior Secretary Santiago Creel, considered the front-runner to win National Action's nomination for next year's presidential race, called a news conference late Thursday night to say "now, finally, as everyone knows, the case is in the hands of the judicial branch."

"Let's all allow the law to run its course and respect institutional order," Creel said.

But even some members of the old ruling Institutional Revolutionary Party (search) — most of whose members voted against Lopez Obrador, as did Fox's National Action Party (search) — expressed regret about Thursday's vote.

"Sure, he represents the old-fashioned, populist left, but in a democracy those issues are decided by votes," not legal charges, said PRI Rep. Roberto Campa.

The mayor — one of the rising tide of charismatic leftist leaders in Latin America — has been criticized for his messianic rhetoric and occasional contempt for democratic precepts such as accountability and the separation of powers. But his followers say the real blow to democracy would be denying millions the right to vote for him, especially after the mayor formally announced his candidacy at the Thursday rally.

"This is a step backward, for me and for millions of Mexicans," Artemio Perez, a 50-year-old street vendor, said as he listened to the vote results on a downtown street, where some of the mayor's supporters cried when they heard the news. "The only thing left to do is to protest, energetically but peacefully."

Indeed, Lopez Obrador took pains not to appear radical, calling for peaceful protests while leaving the door open to mass "civil resistance."

He urged his supporters not to "fall into this trap" set by rivals by taking "radical measures that will scare people away and cause us to lose our popular support, so they can depict us as violent and quarrelsome."

Still, unrest remains possible if Lopez Obrador is jailed. The federal Attorney General's office says it will immediately request a court order for Lopez Obrador's arrest. If a judge approves that request, the mayor will be removed from office. But it remains unclear when that might happen.

The mayor has built a following based on handout programs and public works projects. On Thursday he proposed "a homeland for all, a homeland for the humiliated," which in the past he has said would involve a larger role for the state in the economy, reliance on oil revenues and a renegotiation of free trade pacts.

Financial analysts, meanwhile, worried the dispute is affecting the country's stock market, which fell about 12 percent over the past month after a big expansion in 2004.

Some Mexico watchers say the judicial branch may defuse the crisis by simply dismissing the charges.

"I think the elite are going to wise up and figure out that it's much better having him in a race with all of the uncertainties that implies, rather than go through months of demonstrations," said George Grayson, of the College of William & Mary in Virginia, noting that the mayor's followers "would walk through fire for him" and could tie the country in knots with protests.

Others say that despite the dramatics — Lopez Obrador compared himself to Francisco I. Madero, the Mexican revolutionary hero and president assassinated in 1913 by rebellious general — fears about the mayor and the case against him have been overstated.

"He's going to be a pragmatic politician," said Adolfo Aguilar Zinser, the country's former national security adviser. If Lopez Obrador wins the presidency, "he's going to come to Washington to mend fences and guarantee the interests of those who are most worried about him."