Rabat
Rabat stayed a shadow of its founders' plan until exiles from Spain arrived. Some 3,000 wealthy Moriscos from Hornachos in Extremadura came early in the 17th century, ahead of Philip III's expulsion order of 1609, and thousands of poorer refugees followed. Kept apart from the people of Salé, they settled among the empty Almohad ruins and lived by corsairing. The Dutch renegade Jan Janszoon became their grand admiral in 1624, and in 1627 they threw out the sultan's governor and ruled themselves through a council, the Diwan.
The exiles never stopped looking back. In 1631 the men of Hornachos offered to hand the town to Philip IV of Spain if they might return home, but the talks came to nothing, and fighting broke out between the factions on the two banks; in 1637 English ships bombarded the kasbah. After 1640 the republic fell to Berbers from the upper Moulouya valley, and in the 1660s the Alaouite al-Rashid ended its independence. Only under Sidi Muhammad ibn 'Abdallah, in the later 18th century, did a royal palace, the Dar al-Makhzen, rise at last within the old Almohad walls.