The race for Mexico's presidency has featured mudslinging, backstabbing, revelations of a questionably obtained Miami penthouse, videotapes of cash-filled suitcases and allegations of communist leanings. All this before the campaign has even officially begun -- and with the election almost seven months away.

Political analysts predict the mud will continue to fly until the vote in July, with three major candidates in a virtual dead heat to succeed Vicente Fox in a contest that many view as a crucial test of Mexico's democratic progress.

Fox's watershed election in 2000 broke the 71-year rule of the Institutional Revolutionary Party, or PRI. This time, a candidate from his National Action Party (PAN) is competing against rivals from both the PRI and the center-left Democratic Revolutionary Party (PRD).

All three are trying to position themselves as the man to move Mexico's economy ahead, even if they have to stoop to personal attacks in the process.

"Now we have a democracy, and people are interested in having a better standard of living," said Sergio Sarmiento, a political columnist. "The big question in 2006 is whether we will get the reforms to make the economy more competitive."

During his tenure, Fox has managed to stabilize the economy, keep inflation low and reduce poverty slightly. But he was unable to carry out tax, labor and energy law reforms that experts say are essential to bringing economic growth and foreign investment to a country where 40 percent of the 106 million residents live in poverty.

At this point, Andres Manuel Lopez Obrador, 52, the left-wing former mayor of Mexico City and past president of the PRD, sits atop public opinion surveys by a slight margin among likely voters and is in a statistical tie with his competitors -- Felipe Calderon, 43, of the PAN and Roberto Madrazo, 53, of the PRI -- among the general populace.

Last spring, Lopez Obrador's opponents tried to strip him of his legal immunity as mayor so he could be indicted for ignoring a court order in a minor legal dispute. An indictment would have prevented him from running for president, and the move was widely viewed as an attempt to remove the favorite from the race before it began. Instead, the controversy boosted his name recognition, and his favorability ratings remain high.

But Calderon has also been rising in the polls since he won his party primary in October. The tough-talking lawyer, who was energy secretary under Fox, holds a master's degree from the John F. Kennedy School of Government at Harvard. Calderon made his way up through the PAN to become party president at 33. He is the least- known candidate, but he does not appear to have been seriously tainted by widespread public disappointment in Fox, who came to be viewed as an ineffective leader.

Running just behind in the polls is Madrazo, whose family history is intertwined with the PRI. Like Calderon, he is a lawyer who studied in the United States and became president of his party. But his political past is more clouded. In 1994, he defeated Lopez Obrador to become governor of Tabasco state but faced allegations of illegal over-spending and vote- buying before the election. Ernesto Zedillo, then Mexico's president, asked Madrazo to step down, but he refused. So Lopez Obrador and his supporters formed a blockade around the statehouse that lasted for weeks and brought the government to a standstill.

With the election so far away and the race so close, political analysts agreed that none of the three candidates should be counted out. They predict a messy, dramatic campaign season characterized by a scramble to forge coalitions with four minor parties, a rash of expensive media ads and constant rhetorical attacks.

Already, the race has been tarred by allegations of ill-gotten wealth. Last spring, two of Lopez Obrador's aides and other PRD members were caught on videotape negotiating with businessmen and accepting suitcases reportedly filled with cash. Madrazo won his party primary after his main opponent dropped out following reports that he had made a fortune while in public office and owned a luxury apartment in Paris. Since then, Mexican newspapers have reported that Madrazo owns a million-dollar penthouse in Miami under a front name and four other expensive residences.

The result of too much negative campaigning, said the political commentator Gabriel Guerra Castellanos, is likely to be negative voting. "People will not vote on who they want to be president, but rather on who they don't want to be president," he said.

In the working-class Mexico City neighborhood of Tlalpan, a recent dinner-table discussion with two families suggested both the divisiveness of the upcoming election and the broader disenchantment with politics expressed by many Mexicans. In 2000, everyone in the Lucio and Santiago families voted for Fox in hopes, they said, of breaking the PRI's grip on power. Now, they are casting in all directions.

Griselda Santiago, 58, said she would continue to support the PAN, Fox's party. She worries that Lopez Obrador is too far to the left, comparing him to Venezuela's President Hugo Chavez, an acolyte of Cuba's Fidel Castro. But she doesn't really care who wins, she said, "as long as it's not the PRI."

Her daughter Laura, 36, said she planned to vote for Lopez Obrador as the antidote to Fox, while two Lucio sisters said they were so disenchanted with the PRI and the failed promise of Fox that they might cancel their votes by checking off all the candidates on their ballots.

"I voted for Fox with the idea there would be changes," said Alejandra Lucio, 42. Her sister, Margarita, 44, praised Lopez Obrador for giving the elderly monthly subsidies of $65 when he was mayor, but then added, "We don't believe in any of the three. It doesn't matter what we do. People are very disillusioned with politicians."

The main issue the candidates must confront is the same one that bedeviled Fox: the need for economic reform. One evening last month, when all three appeared at a forum sponsored by the American Chamber of Commerce in Mexico, they were grilled on how to spur economic growth, how to make the country more competitive globally and whether the state-run oil and electricity industries should be opened to foreign investment.

"The main problems that Mexico faces are related to poverty and corruption," said Lopez Obrador, whose campaign slogan is "First the Poor." He said that he opposed foreign investment in energy and that the government should focus on improving education and reforming the tax system, which 40 percent of the population simply evades.

Lopez Obrador's most ardent supporters are found in Mexico City, which he ran for five years. Folksy and blunt, he lived in a modest apartment, drove to his office in an old sedan and worked from dawn until well into the night. He initiated cash subsidies for the elderly and disabled, offered free health care and school supplies and spearheaded large public works programs that generated jobs.

His detractors decry the public debt his projects created and liken him to the fiery Chavez. But one U.S. official here disputed the comparison, labeling Lopez Obrador more of "an unknown" in terms of his world vision and national leadership potential. Lopez Obrador has pledged that if he is elected, he will halve the $173,000 presidential salary and eschew the presidential palace for a smaller house.

Calderon, who said he favored foreign investment in oil and power industries, said Mexico needed to institute a flat tax rate and free-market policies. "Investment that comes in will be welcome, well-received and will be safe," he told the business executives attending the American Chamber conference.

In a separate interview, Calderon said that in the 2006 elections the challenge for Mexicans was "deciding between the past and the future. The PRI is obviously the past," he said. But he added, "Lopez Obrador personifies the vision of the past that caused Mexico to fall into various economic crises" that left the poor even poorer.

Madrazo told the American Chamber audience that Mexico's competitiveness in the world market had suffered because of high energy and transportation costs, a poor education system and growing crime. He skirted the question of whether foreign investment should be allowed in the oil and electricity industries.

"The important thing for this country is how can we be better placed to be able to improve the social standing of our inhabitants," Madrazo said, sounding a lot like Lopez Obrador. Then, in an unusually magnanimous comment for a race already sullied by charges of corruption, he said the real issue for 2006 was "not which party is going to win, but how we can put Mexico in the forefront."

Roberto Madrazo is the presidential candidate of the former ruling Institutional Revolutionary Party.Felipe Calderon, of President Vicente Fox's National Action Party, has been rising in recent polls.Andres Manuel Lopez Obrador, left-wing former Mexico City mayor, leads by a hair among likely voters.