Mexico's highest electoral tribunal has rejected a bid to overturn July's presidential election win of Enrique Pena Nieto by the second-placed left-wing candidate, Andres Manuel Lopez Obrador.
One by one, the tribunal's seven judges rebuffed claims by Lopez Obrador that Pena Nieto's party bought millions
of votes, exceeded campaign spending limits and received biased news coverage.
"We move forward. Through dialogue, understanding and agreements, we move together for the unity and greatness of Mexico"
- Enrique Pena Nieto
"The request to invalidate the election is groundless," court president Jose Alejandro Luna Ramos told a packed courtroom at the end of a session that lasted more than five hours.
The ruling triggered a protest of roughly 5,000 on the streets of Mexico City and clears the way for Pena Nieto to be formally declared president-elect and begin his six-year term on December 1, returning the Institutional Revolutionary Party (PRI) to power after a 12-year absence.
A recount of the election result gave Pena Nieto an estimated 38 per cent of the vote to Lopez Obrador's 31 per cent.
The PRI governed Mexico for 71 years until it lost the 2000 presidential election, but Pena Nieto has promised to break with his party's hard-line past.
"It is time to begin a new phase of work in favour of Mexico," he wrote on Twitter after the ruling.
"We move forward. Through dialogue, understanding and agreements, we move together for the unity and greatness of Mexico."
Lopez Obrador, backed by the Progressive Movement coalition, has accused the PRI of returning to its old ways in order to secure Pena Nieto's victory in the July 1 election.
He claimed that the PRI bought five million votes, including by distributing gift cards for a retail store. His coalition also charged that children were sent to polling stations to check how people voted.
Lopez Obrador's campaign manager Ricardo Monreal denounced the judges as a "band of scoundrels" as it became clear that they would reject the challenge.
Al Jazeera's Adam Raney, reporting from Mexico City, said the Lopez Obrador has no legal recourse at this point.
"The game is over for Andres Manuel Lopez Obrador as far as this election is concerned. There is no way he's going to legally become the next president of Mexico," said Raney.
Our correspondent said that Lopez Obrador continues to mount a protest movement because "he continues to believe that this election was fraudulent, that it was full of corrupt practices...it would be antithetical for Lopez Obrador to go home and pack up and say, 'All right, I lost my case, this is all done.'"
Outside the court, some 300 protesters shouted "Mexico without the PRI," brought down barriers and threw water bottles, corncobs and stones toward the court, as riot police watched passively.
In the previous election in 2006, when Lopez Obrador also ran for president, he refused to recognise the result after he lost to Felipe Calderon, of the conservative National Action Party (PAN), by 0.06 percentage points.
He led massive protests but was unable to change the outcome.
Pena Nieto will inherit from Calderon a brutal drug war that has left more than 50,000 people dead since 2006. Calderon did not run due to term limits.