In the last years of the Hafsids , LOCATION@1 seized many of the coastal cities , but these were recovered by the Ottoman Empire .

In the last years of their reign , the PERSON@1 became weak and LOCATION@1 took control of many city coasts until they were finally occupied by the LOCATION@2 .
