Peru's occupation ended only after January 1942, when the two nations signed the Protocol of Peace, Friendship, and Boundaries while attending the Third Conference of Foreign Ministers of the American Republics in Rio de Janeiro. Under the terms of the Rio Protocol, the informal name of the agreement, Ecuador renounced its claim to some 200,000 square kilometers of territory. Shortly afterward, the Rio Protocol was ratified by a bare plurality of the Ecuadorian legislature.
The Ecuadorian government quickly regretted having become a party to the Rio Protocol. The protocol became the focus of a surge of Ecuadorian national pride and concomitant opposition to Arroyo in a new coalition--the Democratic Alliance. The coalition brought together a wide array of Ecuadorian politicians dedicated to replacing the "president who had been unable to defend the national honor." Arroyo's rejoinder that he would remain in office the full four years, "neither one day more nor one day less," and his being prominently hailed in Washington as "the Apostle of PanAmericanism " only increased his political isolation. A persistent inflation that whittled away at the purchasing power of salaried workers was a further cause of popular resentment against Arroyo.
In May 1944, following an uprising in Guayaquil that pitted the military and civilian supporters of Velasco against Arroyo's police, the president finally resigned. The military handed power to the Democratic Alliance, which in turn named Velasco, whose electoral candidacy had recently been vetoed by Arroyo, as the popularly acclaimed president of the republic. The populist master returned triumphantly from exile in Colombia, greeted by throngs of enthusiasts during a three-day journey to Quito, to assume the presidency for the second time.