Andalusia in Málaga and Seville." Following the Second Rebellion of the Alpujarras in 1568-1571, the Moorish population—that is, unconverted Moriscos—were expelled from Kingdom of Castile (and Aragon). However, by order of the Spanish crown, two Moorish families were required to remain in each village in order to demonstrate to the new inhabitants, introduced from northern Spain, the workings of the terracing and irrigation systems on which the district's agriculture depends. In 1810–12 the people strongly resisted the French occupation during the Peninsular War (part of the Napoleonic Wars). Andalusia profited from the Spanish overseas empire, although much trade and finance eventually
Andalusia as of 2009, which recognizes and guarantees the right of autonomy for the various regions and nationalities of Spain. The process to establish Andalusia as an autonomous region followed Article 151 of the Constitution, making Andalusia the only autonomous community to take that particular course. That article was set out for regions like Andalusia that had been prevented by the outbreak of the Spanish Civil War from adopting a statute of autonomy during the period of the Second Spanish Republic. Article 1 of the 1981 Statute of Autonomy justifies autonomy based on the region's "historical identity, on the self-government that