Updated

Ruling party candidate Felipe Calderon declared Monday that his 370,000-vote lead in Mexico's closest-ever presidential race lead was insurmountable. But his leftist rival refused to concede and electoral officials said they would not declare a winner for days.

Leftist candidate Andres Manuel Lopez Obrador huddled in his apartment with close advisers, trying to determine how to challenge results that increasingly indicated a loss. He insisted in a television appearance that he had won, and did not rule out street protests.

CountryWatch: Mexico

Mexico's stock market, currency and bonds rallied sharply on news of Calderon's lead.

The preliminary tally, with results from 97.38 percent of polling places, gave Calderon 36.37 percent of the vote and Lopez Obrador 35.4 percent.

But the Federal Electoral Institute stressed those results were not final — and said it would not declare a victor until an official count of the tallies from tens of thousands of ballot boxes, which it would not start until Wednesday.

Both candidates' declarations of victory raised questions about their pledges to respect an electoral process in which Mexicans invested hundreds of millions of dollars to overcome decades of systematic fraud.

"We have no doubt that we have won the presidential election," Calderon told supporters.

Monday morning, Lopez Obrador raised questions about the tally and said his party's polls showed him winning by 500,000 votes. In an appearance on the Televisa network, he did not rule out calling protests, but said he wanted to gather the facts first.

"Have patience," he told backers. "We are going to be keeping our supporters informed. We are always going to act responsibly. If we lose the elections I will recognize that. But if we won the vote, I'm going to defend my triumph."

Early Monday, Lopez Obrador's Web site showed an animated cartoon version of him climbing on an Olympic-style winner's podium and donning the red, white and green presidential sash. Calderon's Web site showed a photo of him in front of a large, applauding crowd, overlaid with a headline reading "Felipe Calderon, President of Mexico."

Tensions already were running high after a two-year campaign marked by vicious personal attacks. Calderon painted Lopez Obrador as a radical leftist who would ruin the economy, while Lopez Obrador called Calderon a liar who doled out million-dollar favors to a brother-in-law while serving as energy secretary.

The campaign exposed Mexico's deep class divisions, with Lopez Obrador, of the Democratic Revolution Party, pledging to govern for the poor and Calderon, of the ruling National Action Party, seen by many as the candidate of the rich.

Many feared the close result could cause the tensions to explode.

For decades, elections were rigged to ensure the ruling party's victory — fraud that allegedly included the 1988 presidential count in which a computer crash was blamed for a stunning turnaround that ensured another six years in power for the Institutional Revolutionary Party, or PRI.

Many members of Democratic Revolution regret not fighting harder to challenge the loss of leftist Cuauhtemoc Cardenas, who went on to found their party.

"This is no longer the era of fraud, because the people will not accept it. It is no longer '88," Lopez Obrador said Sunday night.

In part because of outrage over the 1988 elections, PRI was defeated in 2000 after 71 years in power, and sank to a distant third Sunday.

President Vicente Fox, who finishes his single six-year term in December, appealed for patience and calm, saying: "It is the responsibility of all of the political actors to follow the law and respect the time the institute needs to announce the election results."

U.S. Ambassador Antonio Garza, who served as an election observer in a poor Mexico City neighborhood Sunday, said he was "convinced Mexicans will wait patiently and prudently as the Federal Electoral Institute reviews today's voting records."

Some voters said they had no problem waiting because they were convinced the official results would confirm their candidates' victory.

"Now we just have to wait for them to officially confirm Felipe's victory," said Marcela Chavez, 25, a Calderon supporter. "The tendency is clear and he is going to win."

In other races, National Action did well in three governor contests — Morelos, Guanajuato and Jalisco — while Marcelo Ebrard of Democratic Revolution easily won the Mexico City mayor's post, exit polls indicated.

National Action appeared to win the most seats in both houses of Congress — but was far from a majority in either. PRI fell into third place in Congress for the first time.

The estimated 11 million Mexicans living in the United States were allowed to vote from abroad for the first time, but the more than 32,000 ballots they cast weren't likely to make much of a difference.

"The main thing is, the door has been opened," said Jesus Hernandez, who sent in his ballot from California. "Later, we can reconstruct the procedures to make it easier in the future."