The mosque was commissioned by Khadi Nasrullah, a judge of the Ottoman Empire. It was built in 1506, during the reign of Sultan Beyazıt II. The building underwent restorations in 1746, 1845 and 1945.[1]