The mosque was restored between 1931-1939. Muhammad Ali Pasha is buried inside the mosque, he passed away in 1849. Muhammad Ali was born around 1769 in Kavala (modern day Greece), the surname Pasha, a designation of high noble rank in the Ottoman Turkish empire, was given to him after he assumed Egyptian rule.