The election of a radical liberal government in 1823 further destabilized Spain. The army – whose liberal leanings had brought the government to power – began to waver when the Spanish economy failed to improve, and in 1823, a mutiny in Madrid had to be suppressed. The Jesuits (who had been banned by Charles III in the 18th century, only to be rehabilitated by Ferdinand VII after his restoration) were banned again by the radical government. For the duration of liberal rule, King Ferdinand (though technically head of state) lived under virtual house arrest in Madrid.