Mexican President Vicente Fox could keep the capital's embattled mayor in the presidential race by pardoning him if he is convicted, his spokesman says.
Mr Lopez Obrador said he would not apply for bail if arrested
The suggestion came six days after Mexico's Congress voted to strip Andres Manuel Lopez Obrador of his immunity from prosecution in a land dispute.
Mr Fox was unhappy that the prosecution was seen as politically motivated, spokesman Agustin Gutierrez Canet said.
Mr Lopez Obrador was tipped to win the 2006 election before the case erupted.
Since taking office as mayor of Mexico City in December 2000, he has become one of the country's most popular politicians.
He is accused of breaching a court order after allowing the construction of an access road to a city hospital said to go through a disputed plot of expropriated land.
Mr Lopez Obrador, who belongs to the left-wing Party of the Democratic Revolution (PRD), says the attempt to convict him for contempt of court is frivolous.
He has now stopped working and says he will wait at home to be arrested. He is also seeking an injunction from the Inter-American Commission of Human Rights.
Poll ban looms
Mr Lopez Obrador's supporters cried foul after Mexico's two biggest political parties - the president's National Action Party (PAN) and the main opposition Institutional Revolutionary Party (PRI) - joined forces in Congress to strip the mayor of his immunity.
It is now up to a judge to decide whether he should face any legal charges. If he is charged, he is likely to be fired as mayor and may be barred from running in the election.
Mr Lopez Obrador says it is a plot to keep him out of the race, but President Fox says he is just letting the courts do their job.
Mr Gutierrez Canet said that if the mayor were eventually convicted, the president could pardon him.
"It is one hypothesis," he was quoted as saying by Reuters news agency. "It is not a decision that has been taken. It is being analysed as one of the scenarios."
The spokesman said a presidential pardon would prove that the case was purely a legal matter.