Guatemalan President Bernardo Arévalo has accused the prosecutor's office of leading an attempted coup seeking to dismantle what he calls the democratic order.