Alan Garcia seeks asylum hours after being barred from leaving the country pending a corruption probe.

Alan Garcia, an ex-Peruvian president, has sought political asylum in the embassy of Uruguay, hours after prosecutors barred him from leaving the country as part of a corruption probe.

“The former president has requested asylum … in accordance with the provisions of the Convention on Diplomatic Asylum of 1954, of which Peru and Uruguay are parties,” the Peruvian foreign ministry said in a statement on Sunday.

It said it was informed by Uruguay’s ambassador to Lima that Garcia had entered his residence seeking protection.

Late on Saturday night, a judge granted prosecutors’ request that Garcia is banned from leaving Peru for 18 months.

Garcia says he is a victim of political persecution, a charge rejected by President Martin Vizcarra.

La @CancilleriaPeru hace de conocimiento de la opinión pública que el Embajador de la República Oriental del Uruguay le comunicó esta mañana que el ex presidente del Perú @AlanGarciaPeru ingresó en horas de la noche de ayer a su residencia. ►https://t.co/husFlF1aZS pic.twitter.com/wQZo8kGmeB — Cancillería Perú🇵🇪 (@CancilleriaPeru) November 18, 2018

The 69-year-old, who was twice president of Peru, is under investigation for bribes allegedly paid by Brazilian construction giant Odebrecht to secure contracts during his second term in office, from 2006 to 2011.

Odebrecht has admitted to paying nearly $800m in bribes to governments across Latin America, including $29m to win contracts in Peru over the course of three administrations.

The Car Wash scandal, as it came to be known, led to the jailing of numerous Latin American politicians, especially in Brazil and Peru.

Pedro Pablo Kuczynski, another former Peruvian president, was forced to resign in March for hiding his past work as a consultant for Odebrecht.

Two other former presidents, Ollanta Humala and Alejandro Toledo, are also under investigation for allegedly taking illegal payments.

This is the second time Garcia has sought to flee to another country amid corruption charges.

Following the end of his first government in 1990, he spent nine years in exile in neighbouring Colombia and then France after his successor, Alberto Fujimori, reopened a corruption probe and police raided his house.