Mexico’s highest electoral court has dismissed a legal challenge to the result of July’s presidential election by the runner-up, left-winger Andres Manuel Lopez Obrador.
Mr Lopez Obrador had accused winner Enrique Pena Nieto of using illicit money to buy votes and media coverage.
But the court ruled that he had not produced enough evidence of wrongdoing.
A recount of the election result gave Mr Pena Nieto 38% of the vote to Mr Lopez Obrador’s 31%.
All seven judges on the Federal Electoral Tribunal voted on Thursday to reject the runner-up’s accusations.
“There is no proof of vote-buying, there is no proof of coercion,” Judge Flavio Galvan Rivera told the tribunal.
Mr Pena Nieto’s Institutional Revolutionary Party (PRI), which governed Mexico for 71 years until 2000, denied any wrongdoing.
The BBC’s Will Grant, in Mexico says that is now clear that Mr Pena Nieto will be sworn in as Mexico’s next president on 1 December.
“It is time to start a new phase of work on Mexico’s behalf,” Mr Pena Nieto tweeted after the ruling.
“With dialogue, understanding and agreements, we move together for the unity and greatness of Mexico.”
There were minor scuffles between police and anti-PRI protesters outside the court after the decision was announced.
A student movement has organised several demonstrations against Mr Pena Nieto’s victory since the election, and further large protests may take place in Mexico City in the next few days, our correspondent says.
But there are very options left for Mr Lopez Obrador and his supporters, and the tribunal’s decision – while expected by many – may have taken the wind out of their sails, he adds.
Mr Lopez Obrador, a former mayor of Mexico City who leads the Party of the Democratic Revolution (PRD), accused the PRI of bribing voters with presents ranging from supermarket gift cards to fertilizer, cement and livestock.
He also claimed Mr Pena Nieto had broken campaign rules by overspending, and that Mexico’s media was biased in favour of the PRI candidate.
One of the main challenges awaiting the new president will be the future of current government anti-drugs policy.
The PRI did not win a majority in congressional elections, also held on 1 July. This means he will probably need support from opposition parties.