The May Revolution was a direct reaction to Spain's Peninsular War of the previous two years. In 1808, King Ferdinand VII of Spain abdicated in favor of Napoleon. Napoleon gave the throne to his brother, Joseph Bonaparte. 