MEXICO CITY, Mexico (AP) -- The ruling party's Felipe Calderon won the official count in Mexico's disputed presidential race by just under 0.6 percent Thursday, the culmination of a come-from-behind campaign for a recently obscure technocrat.

But his leftist rival earlier declared victory and said he'd fight the election in court.

Calderon was already reaching out to other parties to build a "unity government," while his rival, Andres Manuel Lopez Obrador, blamed fraud for his narrow loss in the vote count and called on his supporters to fill Mexico City's main square Saturday in a show of force.

With the 41 million votes counted, Calderon of President Vicente Fox's National Action Party had 35.88 percent, or 14,981,268 votes, to 14,745,262, or 35.31 percent, for Lopez Obrador of the Democratic Revolution Party. The two were separated by 0.57 percent, or 236,006 votes.

Roberto Madrazo, whose Institutional Revolutionary Party controlled Mexico for 71 years until Fox's victory in 2000, had 22.27 percent, and two minor candidates split the rest.

Challenges go before the country's top electoral court. A winner must be declared by September 6. The next president begins a single, six-year term on December 1.

Mexican stocks opened higher and the peso rebounded Thursday on news of Calderon's apparent victory.

But many obstacles remain in Calderon's path. If his triumph is upheld by electoral courts, he will face a Congress dominated by opposition parties, as well as a divided nation that sends millions north to work in the United States illegally.

U.S. President George W. Bush's decision to send National Guard troops to the border has increased tensions in Mexico, as has a U.S. congressional proposal to extend walls along the two countries' frontier.

Calderon wants to rely on Mexico's many free-trade accords to create jobs and crack down on rising crime, and says he'll try to smooth U.S. relations without letting Washington dominate.

"I want to establish a very constructive relationship without bowing my head and lowering my eyes to the Americans," Calderon said in heavily accented English during an interview with The Associated Press.

"I have met with President Bush several times. I have interviewed with President Bush and several members of the American Congress, and I know it's possible to establish a more constructive relationship, and that would be very good for both countries."

Addressing hundreds of cheering supporters before dawn Thursday, he called on Mexicans to move beyond the bitter campaign and "begin a new era of peace, of reconciliation."

He reached out to the millions of people who voted against him, asking for a "chance to win your confidence."

For months, Lopez Obrador had been the easy front-runner in the race, promising to govern for the poor and launch big public works projects. But he slipped in the polls after he refused to take part in the first of two televised debates, and never quite recovered.

"It was Andres Manuel Lopez Obrador's election to lose, and he lost," said Andrew Selee, director of the Mexico Institute at the Woodrow Wilson Center in Washington