Former justice minister Eda Rivas took the oath of office on Wednesday as Peru’s foreign minister, becoming the first woman to hold the top diplomatic post.

President Ollanta Humala administered the oath to Rivas, 61, in a televised ceremony at Peru’s government palace.

Rivas replaces Rafael Roncagliolo, who resigned following diplomatic spats with Ecuador and Venezuela.

Rivas takes office ahead of one of the most important events in the South American country’s foreign policy in decades: the International Court of Justice in The Hague’s ruling on a lawsuit Peru filed in 2008 against Chile over their maritime border.

Rivas’s tenure as justice minister included accepting a petition for pardon from Alberto Fujimori, the ex-Peruvian leader serving a 25-year prison sentence for human rights abuses.

Roncagliolo, an academic and journalist with no diplomatic experience, resigned “strictly for health reasons”, a statement from the presidential palace read.

Roncagliolo’s tenure was marked by diplomatic clashes with the leftist governments of Venezuela and Ecuador.

On May 3 Venezuelan leader Nicolas Maduro told Roncagliolo to “not get involved in Venezuela’s internal affairs” when the latter announced that Peru would hold a summit to urge Caracas to talk with their political opposition, which challenged the results of the April 14 presidential election.

Regarding Ecuador, two women claimed they were accosted by Quito’s ambassador to Lima, Rodrigo Riofrio, at a supermarket.

Both countries withdrew ambassadors, and the situation was eventually resolved when Ecuador relented and named a new envoy.