LIMA, Peru (AP) — A Peruvian judge has ordered ousted President Pedro Castillo to remain in custody for 18 months, approving a request from authorities for time to build their rebellion case against him. The ruling Thursday came a day after the government declared a state of emergency as it struggles to calm violent protests that have led to at least 14 deaths. The protests erupted after Castillo was voted out of power by lawmakers last week, following his attempt to dissolve Congress ahead of an impeachment vote. Castillo and his legal team refused to participate in Thursday’s virtual hearing, arguing it lacked “minimum guarantees.” He was represented by a public defender.