Pedro Castillo's swift fall from power on Wednesday came after congressional lawmakers voted overwhelming to remove the deeply unpopular leader after his effort to dissolve Congress and rule by decree was thwarted earlier in the day.

Castillo was arrested Wednesday on criminal charges of "rebellion and conspiracy," according to prosecutors, at the same time he had been facing separate corruption allegations.

The preliminary hearing on Thursday is expected to evaluate the legality of his arrest, as well as touch on an inquiry by the Attorney General's Office into charges he orchestrated an alleged rebellion.

Castillo lawyer Victor Perez rejected the rebellion charge at the hearing, arguing that such an act implies use of weapons and violence, which he said never occurred.

The former president attended the hearing via teleconference and was asked if he wanted to address the court, but he declined.

VICE PRESIDENT SWORN IN

Capping the whirlwind sequence of events, Dina Boluarte, Castillo's vice president, was sworn in as the South American country's new president, making her the first woman to lead the South American country.

The 17-month tenure of the 53-year-old leftist Castillo was marked by unprecedented turnover among senior officials in his administration, as well as multiple corruption scandals which he dismissed as politically motivated efforts by conservative enemies in the opposition-controlled Congress to undermine his government.

Castillo is being held in a police prison in the capital Lima where another former president, Alberto Fujimori, is also being held, a judicial source told Reuters early on Thursday.

Boluarte, 60, could begin to name a new cabinet over the next few days to lead the world's second-biggest copper producer, with expectations running high that she will opt for a unity government.

In brief comments on Thursday morning to reporters at the presidential palace, Boluarte suggested that calling early elections could be "democratically respectable" but added she wants to hold additional discussions first.

(Reporting by Marco Aquino; Editing by Aurora ellis)

By Marco Aquino