In 1331, the Moroccan scholar and explorer Ibn Battuta sailed south along the East African coast, visiting Mogadishu, Mombasa, and Kilwa. At Kilwa he met Sultan Abu'l-Muzaffar Hasan and recorded the city's wealth, architecture, and gold trade dominance over Sofala. His account in the Rihla — composed from memory around 1355 — remains among the most important primary sources for medieval East African history, as few contemporary written records of the Swahili Coast survive. Though scholars note occasional inaccuracies, his observations provide an irreplaceable eyewitness portrait of Kilwa near the peak of its power.