It was a day on which much of Peru was focused on Congress, where an impeachment vote was planned against the president on corruption charges.

But shortly before noon, the Peruvian leader addressed the country in a surprise televised address. He announced the dissolution of Congress and the installation of an emergency government, stunning political leaders across the spectrum, including his own allies, by effectively trying to carry out what was widely condemned as an attempted coup to cling to power.

Government officials resigned en masse. The top court declared the move unconstitutional. And the country’s armed forces and the national police issued a joint statement suggesting they would not support him.