The Prophet ﷺ stayed in Mecca for nineteen days, praying two rakahs.
أقام النبي ﷺ بمكة تسعة عشر يوما يصلي ركعتين.
Bukhari reported it in the Book of Military Expeditions (4298) from Abdan, who said, Abdullah (that is, Ibn Mubarak) told us, Asim (that is, Ibn Sulayman al-Ahwal) told us, from Ikrima, from Abdullah bin Abbas, and he mentioned it.Ibn Idris said, Muhammad bin Ishaq told us, from Muhammad bin Muslim bin Shihab, Muhammad bin Ali bin Husayn, Asim bin Umar bin Qatada, Amr bin Shuayb, and Abdullah bin Abu Bakr, who said, "When the Messenger of Allah ﷺ conquered Makkah, he stayed there for fifteen days." Fasawi in al-Marifa wal-Tarikh (3/296) and Ibn Hisham in his Sirah (2/437) recorded it.Bayhaqi said in ad-Dalail (5/23, 24), "This is munqati (broken in its chain), and the more correct narration is that of Ibn Mubarak, from Asim al-Ahwal, which is the one Bukhari, may Allah have mercy on him, relied upon."