[3] Gervasi was appointed Minister of Foreign Affairs as part of President Dina Boluarte's new cabinet on 10 December 2022, following the arrest and impeachment of Pedro Castillo.
[7][8] On 13 December, Gervasi summoned the ambassadors of Mexico, Bolivia, Argentina, and Colombia after their governments had signed a joint communique expressing concerns over Castillo's dismissal and arrest.
Gervasi said on Twitter she "reiterated to them that the presidential succession is constitutional and that the decisions of former president Castillo on December 7 materialized a coup d'état".
[9] Gervasi resigned as minister on 6 November 2023 after she failed to secure a bilateral meeting between Boluarte and U.S. President Joe Biden at a summit in Washington.
[10] A formal meeting with Biden at the White House was considered an important step in gaining international legitimacy for the Boluarte administration following Castillo's arrest.