It took around a quarter of a century to build and was funded by the ransoms paid by captured Portuguese nobility, by sugar cane revenues, and by the profits of the trans-Saharan trade routes which Al-Mansur conquered during his reign.[52] This allowed Carrara marble to be imported from Italy, other materials coming from France, Spain and even India.[51] Its layout, with two monumental pavilions facing each other across a symmetrical courtyard, reflects the traditional Andalusian/Moorish layout seen in the smaller Court of the Lions at the Alhambra.[47] After the end of the Saadian dynasty in the 17th century the palace fell into neglect and was then systematically looted by the Alaouite sultan Moulay Isma'il for its valuable materials like marble.[52] The preserved ruins of the palace are open today as a tourist attraction.