Pérez's downfall came when a legal process was begun to force to him reveal how he had used a secret but legal[citation needed] presidential fund, which he resolutely resisted. With the Supreme Court and Congress ranged against him, Pérez was imprisoned, for a while in a detention center, and then under house arrest. He handed the presidency in 1993 to Ramón J. Velásquez, an Adeco politician and historian who had been his presidential secretary.