Former president Pedro Castillo was impeached by Congress on Tuesday and later arrested on suspicion of rebellion.
Peru has a new president - and its first female leader - after its former leader Pedro Castillo was impeached by Congress.
Dina Boluarte, who was previously his vice-president, was sworn in amid a constitutional crisis in Lima.
Earlier on Wednesday Castillo had announced he was replacing Congress with an "exceptional emergency government."
The head of the Constitutional Court then accused him of launching a coup d'etat and lawmakers approved his removal from office. Footage was then released showing Castillo signing papers with prosecutors.
It was the third attempt to impeach Castillo since he came to office in July last year. In a previous effort to stay in power, Castillo declared he was going to rule by decree.
Peruvian police have since confirmed that Castillo was arrested on a charge of rebellion, prompting some celebrations on the streets.Lawyers are now investigating six cases against him, most for alleged corruption.
Castillo had been locked in a power struggle with Congress since the country's attorney general filed a complaint, accusing him of heading a criminal organisation.
Castillo, his family, and his allies are also accused of handing out public contracts in exchange for kickbacks.
Following her appointment, Boluarte has called for a political truce and the installation of a national unity government.
Watch the video in the player above.