Updated

The future of Mexico's young democracy lies in the hands of seven judges who have the final word on a disputed presidential election that has strained class divisions and threatened the nation's stability, with one candidate calling for millions to protest.

The magistrates — including Mexico's first female district judge and a respected author on ethics and democracy — have shown toughness and independence in thousands of electoral disputes, ruling against all three major parties.

But they have never faced a challenge like this. Mexicans are counting on them to find a peaceful solution to a battle between Felipe Calderon, the ruling party candidate backed by the business community, and Andres Manuel Lopez Obrador, a fiery populist.

An official count gave Calderon a lead of less than 0.6 percent. Despite the uncertainty, he said Friday he was setting up a committee to lay the groundwork for his administration.

Lopez Obrador's Democratic Revolution Party said it will testify Saturday at the first public hearings before the Federal Electoral Tribunal, beginning what will likely be a weekslong investigation into 364 complaints from the parties.

The judges, who must issue a ruling by Sept. 6, face three choices: declaring a winner, ordering a recount, or annulling the vote. Each could have grave consequences.

If the judges confirm Calderon won the July 2 election, Lopez Obrador is likely to reject the ruling and stage massive protests. The former Mexico City mayor has already held two mass demonstrations since the election, and has called for supporters to fill the capital's main Zocalo plaza Sunday.

If they order a recount, they risk weakening a law designed to combat fraud by prohibiting ballot boxes from being opened unless there is evidence of irregularities.

If they annul the elections, they will leave Mexico without a president-elect for more than a year, threatening the country's stability. No candidate has supported annulling the vote.

"These judges have impeccable credentials," said George Grayson, a Mexico expert at the College of William & Mary in Virginia. "They have stepped on everybody's toes in delivering more than 20,000 decisions. I think they will deliver a deliberate, fair and impartial judgment."

The judges are the country's highest paid public officials with salaries of about $415,000 a year to ensure no one can buy them off, and Mexican law gives them wide discretion. This will likely be the biggest decision of the 10-year term that ends in October for six of the seven magistrates. One was nominated in 2003.

Since the Senate confirmed them as the country's first electoral judges a decade ago, they have nullified 17 local, state and congressional elections. The biggest case involved the 2000 gubernatorial race in Lopez Obrador's home state of Tabasco, where the judges ruled that the ruling-party governor interfered.

Lopez Obrador has alleged the same about President Vicente Fox in the presidential race and is banking on the law's ambiguity to win a recount of all 41 million votes. The ruling National Action Party says a full recount violates Mexican law.

Lopez Obrador's party says it has found irregularities at 40 percent of the 130,488 polling places. It also has accused Calderon of running a dirty campaign that gave him an unfair advantage.

The court could rule unfair conditions altered the results and annul the elections. Mexico's Congress then would have to name an interim president by a two-thirds vote and call new elections within 18 months.

But Grayson said the court is unlikely to do that. When it threw out the Tabasco race, "the fraud was ubiquitous, it was everywhere." Electoral officials and most international observers have said the July 2 election was largely clean.

"I don't think there's a snowball's chance in the Sonoran desert that they will annul this election," Grayson said.

A poll published Thursday by El Universal newspaper found 48 percent of Mexicans support a recount and 28 percent were opposed. The same poll, however, found only 16 percent would protest if the court ruled Calderon had won. The company Ipsos-Bimsa interviewed 1,000 adults across Mexico between July 21-24 and the poll had a margin of error of 3.5 percentage points.

Lopez Obrador has blamed Mexico's wealthy elite for the election result and said the poor, who make up his main support base, would fight for him until the end.

On Friday, more than 100 people, including Triqui Indian women dressed in their traditional woven tunics, protested outside the tribunal, plastered with signs claiming the election was stolen from Lopez Obrador.