Castillo was ousted in an impeachment trial last week and arrested after trying to dissolve the Andean nation's Congress. His initial detention is set to end in the coming hours and prosecutors are now looking to move him from preliminary detention to preventive arrest.

(Reporting by Marco Aquino; Editing by Andrew Heavens)