Hafsid dynasty
In the last years of the Hafsid dynasty, Spain seized many of the coastal cities, but these were recovered by the Ottoman Empire.