Built by the Almohads in the 12th century on the site of the original 10th-century ribat fortress, Rabat's cliff-top kasbah is a delight to explore. Standing sentry over the mouth of the Oued Bou Regreg, the kasbah has been the one constant in the city's history, inhabited during both the good times and the bad. Today it's a quaint villagelike quarter, only 150m (500 ft.) from one end to the other, and crammed with rows of whitewashed houses with brightly colored doors. It still exudes a whiff of its Andalusian heritage, though little of its notorious pirate past. The main entrance gate is the ornately decorated Bab Oudaïas. Constructed during the late-12th-century building spree of the Almohad sultan Yacoub el Mansour, it houses a series of chambers that would have originally been the city's courthouse and staterooms, and are now used regularly to house art exhibitions. The kasbah's main thoroughfare, rue Jemaa, runs from here straight through the kasbah, passing a couple of art galleries and the 12th-century mosque from which the street gets its name. About halfway is the junction with rue Bazo, which winds down to the Andalusian Gardens (free admission; daily sunrise-sunset), which is accessed via Café Maure, a popular stop for mint tea and biscuits with a great view of the river mouth, open daily from 9am to 5pm.

The gardens were actually constructed during the protectorate era and occupy the grounds of a former palace, built in the 17th century by the Meknes-based Sultan Moulay Ismail. Ismail was the first sultan to have any control over the Sallee Rovers, a feat accomplished largely due to his garrison of Saharan tribesmen, called the Oudaïas, which were housed here. The palace is now a museum (10dh adults, 3dh ages 5-12; daily 9am-noon and 3-5pm [closes at 6pm May-Sept]), with various exhibitions of jewelry, clothing, ceramics, and traditional musical instruments now housed in its former reception rooms. It can also be accessed via a small outside entrance halfway between Bab Oudaïas and the southwestern corner of the kasbah. At the end of rue Jemaa is a wide-open area called Le Plateforme du Semaphore. This former signal station was built during the times of the Sallee Rovers, affording them a sweeping view of any seafaring enemy, and would have been lined with cannon. Today it's a social gathering point for locals, and one of the best places to head should the summer humidity become unbearable; it also affords a great sunset view. The city's beaches are also accessible from here down a series of steps.

Tip: As you make your way up to Bab Oudaïas, you may be accosted by young women armed with syringes. These are the city's henna ladies, and their syringes are filled with harmless green henna. They have a very irritating sales pitch, initiated by surreptitiously squirting henna on your hand without your consent. If you'd like a temporary Berber-designed tattoo, then by all means enjoy the experience. If you don't, then be aware that the henna can stain your clothes, so be wary when they approach you.