Ibn Battuta recorded his visit to the Kilwa Sultanate in 1330, and commented favorably on the humility and religion of its ruler, Sultan al-Hasan ibn Sulaiman, a descendant of the legendary Ali ibn al-Hassan Shirazi. He further wrote that the authority of the Sultan extended from Malindi in the north to Inhambane in the south and was particularly impressed by the planning of the city, believing it to be the reason for Kilwa's success along the coast. During this period, he described the construction of the Palace of Husuni Kubwa and a significant extension to the Great Mosque of Kilwa, which was made of coral stones and was the largest Mosque of its kind. With a change in the monsoon winds, Ibn Battuta sailed back to Arabia, first to Oman and the Strait of Hormuz then on to Mecca for the hajj of 1330 (or 1332).