Buenos Aires repelled two ill-fated British invasions in 1806 and 1807. The ideas of the Age of Enlightenment and the example of the first Atlantic Revolutions generated criticism of the absolutist monarchy that ruled the country. As in the rest of Spanish America, the overthrow of Ferdinand VII during the Peninsular War created great concern.