Beginning in the 13th century, Muslims fleeing persecution by Christians in what is now Spain and Portugal settled in cities across North Africa, including Tunis, bringing with them their music. Tunisian malouf, and its closely related cousin in Libya, was later influenced by Ottoman music. This process peaked in the middle of the 18th century, when the Bey of Tunisia, Muhammad al-Rashid, a musician, used Turkish-style instrumental compositions in his work and firmly set the structure of the nuba. Though his system has evolved considerably, most of the instrumental sections of modern nubat are derived from al-Rashid.