Peruvian President Pedro Castillo at the VII Ministerial Summit on Government and Digital Transformation of the Americas
Peruvian President Pedro Castillo addresses the audience during the opening of the VII Ministerial Summit on Government and Digital Transformation of the Americas, in Lima, Peru on November 10, 2022. Reuters

Peruvian prosecutors on Wednesday were seeking 18 months of preventive detention for ousted president Pedro Castillo as his successor cautioned against further violence in a week of political upheaval that has already led to six deaths.

Castillo was ousted in an impeachment trial last week and arrested after illegally trying to dissolve the Andean nation's Congress, the latest in a series of political crises the world's second-largest copper producer has faced in recent years.

Peru's Supreme Court met to consider the prosecution's request for preventative detention for democratically-elected Castillo after he was charged with rebellion and conspiracy, but it later suspended the session until Thursday.

Castillo's former vice president Dina Boluarte was sworn into office after his removal.

The political upheaval has sparked widespread protests around the Andean country, especially in more rural and mining regions that propelled the former peasant farmer and teacher to office in July last year following a knife-edge election win.

Six people, mostly teenagers, have died in clashes with the police.

Boluarte, speaking to reporters from the presidential palace, called for peace and said "we can't have a dialogue if there's violence between us."

She said elections could be moved forward further to December 2023 from April 2024, a date she had pledged earlier. The vote is currently slated for 2026 when Castillo's term would have ended.

Since his arrest Castillo has been in preliminary detention, which was due to end in the coming hours.

Peru's judiciary said on Twitter it would hold a hearing on a "request for preventive detention for 18 months against former president Pedro Castillo and (former Prime Minister) An?bal Torres, investigated for the crimes of rebellion and others."

Castillo called on supporters to come on Wednesday afternoon to the police DIROES facility where he is being held. He says he should be released after an initial seven-day period of preliminary detention expires later on Wednesday.

However, sources from the prosecutor's office and analysts said that Castillo cannot be released while the supreme court resolves the prosecutor's request for preventive detention.

"I await you all at the DIROES facilities to join you in a hug," Castillo said in a hand-written message posted on Twitter, signing it as the "Constitutional President of Peru". Castillo has denied charges of rebellion and conspiracy.

On Wednesday Castillo called for the Inter-American Court of Human Rights to intercede on his behalf in the case, as dozens of supporters gathered at the prison demanding he be freed.

"Enough already! The outrage, humiliation and mistreatment continues. Today they restrict my freedom again with 18 months of pretrial detention," he wrote. "I hold judges and prosecutors responsible for what happens in the country."

Castillo has gained some support from fellow regional leftist leaders, including Mexican President Andres Manuel Lopez Obrador, who criticized his removal as undemocratic.

Peru's president Pedro Castillo delivers his address to the nation
Peru's President Pedro Castillo walks, ahead of delivering his Independence Day address to the nation, outside the Legislative Palace in Lima, Peru July 28, 2022. Reuters
Peru's socialist presidential candidate Castillo attends a rally in Lima
Peru's socialist presidential candidate Pedro Castillo, who will face opponent right-wing candidate Keiko Fujimori in a run-off vote on June 6, addresses supporters at a rally in Lima, Peru May 26, 2021. Reuters
Peru's presidential candidate socialist Pedro Castillo attends a rally in Lima
Peru's presidential socialist candidate Pedro Castillo, who will face opponent right-wing candidate Keiko Fujimori in a run-off vote on June 6, speaks to supporters during a rally in Lima, Peru May 18, 2021. Reuters
Supporters of ousted Peruvian leader Castillo gather outside the police prison where he is detained, in Lima
People hold onto barriers next to a police officer as supporters of ousted Peruvian leader Pedro Castillo gather outside the police prison where he is detained, in Lima, December 14, 2022. Reuters