On 2 May 1808 the people of Madrid rebelled against the French occupation of their city; this event was followed by the abdication of the royal family in Bayonne and the proclamation of Napoleon's brother Joseph as king of Spain. When news of the uprising reached Málaga, its citizens revolted against the French invaders, with the guerrillas in the mountains putting up the fiercest resistance.