Governing party candidate Felipe Calderon has called for unity with his defeated rival, after being formally declared Mexico's president-elect.
Calderon said he wanted to use opposition proposals
He said the country had to be united to defeat its real enemies - poverty, crime and unemployment.
But his opponent Andres Manuel Lopez Obrador, who lost by less than 1%, alleged widespread fraud, and still refuses to accept defeat.
Mr Calderon will take office on 1 December for a single six-year term.
"I want to again express my recognition of my adversaries," said Mr Calderon in a televised address on Tuesday evening.
"Their proposals, the most worthwhile ones, which are the most legitimate and representative, will be incorporated into my government programme.
"From my side, there will always be an extended hand and an open door to dialogue."
But Mr Lopez Obrador, whose supporters have held repeated demonstrations since the July election, said he did not accept the top electoral court's ruling.
"I do not recognize someone who tries to act as the chief federal executive without having a legitimate and democratic representation," he told supporters in Mexico City's main square, the zocalo.
The court decision came after weeks of legal wrangling over the closest presidential election in Mexican history.
The judges all voted in favour of a recommendation to declare Mr Calderon, candidate of the governing National Action Party (PAN), president-elect and reject allegations by Mr Lopez Obrador that the campaign had been unfair.
The final vote count gave Mr Calderon victory by 233,831 votes out of a total of some 41.6m cast.
The judges criticised political advertising during the campaign and the conduct of outgoing President Vicente Fox, but said this was not enough to declare the poll void.
Lopez Obrador still insists that he won the poll
Outside the court in Mexico City, Mr Lopez Obrador's supporters wept and set off fireworks that could be heard inside as the judges announced their decision.
"This has been fraudulent from start to finish," Claudio Martinez told the Associated Press news agency.
The court's president, Leonel Castillo urged Mexicans to unite and heal the deep divisions exposed by the election and its aftermath.
"I hope we conclude this electoral process leaving confrontation behind," he said.
But that is unlikely in the bitter political climate, correspondents say.
Last Friday, there were chaotic scenes in the Congress when dozens of opposition deputies took over the podium and prevented President Fox from making his state-of-the-nation speech.
The electoral court's ruling is final
Since the election, Mr Lopez Obrador's supporters have been almost permanently camped out in the capital's main square.
Thousands of Mexicans turned out on Sunday at a rally in Mexico City in which Mr Lopez Obrador declared he would go ahead and set up what he called a "national democratic convention" on 16 September - Mexico's Independence Day.
The United States has congratulated Mr Calderon on his victory.
"We expect our relationship with Mexico to continue to be broad, deep, and productive for both our countries under the administration of President-elect Calderon," said White House spokeswoman Dana Perino.