Following the death of al-Ghalib in 1574, the Saadians entered into a dynastic succession conflict, provoking Portuguese intervention. After a celebrated victory over the Portuguese king at a 1578 battle at Ksar el-Kebir, the new Saadian ruler, Ahmad al-Mansur (r.1578-1603), continued al-Ghalib's building program in Marrakesh, and took Saadian pretensions to a new height, earning him the appellation "al-Dhahabi" ("the Golden"). He abandoned the Kasbah and erected a new sumptuous residence for himself, the El Badi Palace (meaning "the Splendid" or "the Incomparable", an enlarged version of the Alhambra in Granada). He raised a professional standing army, adopted the caliphal title of 'al-Mansur', and emulated the ornate ceremonial magnificence of the Ottoman court (including speaking to courtiers only from behind a curtain). Al-Mansur initially financed his extravagances with the ransoms of Portuguese prisoners and heavy taxation. When these wore out, and the populace began simmering, al-Mansur seized control of the trans-Saharan trade routes and went on to invade and plunder the gold-saturated Sudanese realm of the Songhai Empire in 1590–91, bringing Timbuktu and Djenné temporarily into the Moroccan empire.