Following the Peace of Zsitvatorok (1606) and the unfavourable result of the wars with Persia, Sultan Ahmed I decided to build a huge mosque in Istanbul. It would be the first great imperial mosque to be built in more than forty years.His predecessors had paid for their mosques with their war booty, Sultan Ahmed I had to withdraw the funds from the treasury, because he had not won any notable victories during his time. This provoked the anger of the Ottoman ulema, the Muslim legal scholars.