The construction of the mosque and the külliye complex was commissioned by Ottoman sultanAbdul Hamid II, and finished in 1887. It is dedicated to the founder of the Medeni branch of Shadhili tariqa, a Libyan Sufi, Sheikh Hamza Zafir. The mosque is named after Ertuğrul Gazi, the father of the founder of the Ottoman Empire, Osman I, as a commendation to him. The name also comes from the Ertuğrul regiment, a royal palaceguard regiment which comprises Turks from the Domaniç region. Initially the complex only consisted of the mosque, tekke, and the guesthouse. After the death of Sheikh Hamza Zafir in 1903, his türbe was constructed next to the mosque by the Italian architectRaimondo D'Aronco between 1905 and 1906. The library and the fountain were also added in this expansion. After the passing of Sheikh Hamza Zafir, his two brothers Muhammed Zafir Efendi and Beşir Zafir Efendi became the sheikhs of the tekke. They are also buried in the türbe next to their elder brother. The complex is mainly built as a guesthouse to various sheikhs and Islamic scholars that visit Istanbul from the Islamic world in an effort to strengthen the power of the position of the Caliphate in the Islamic world. After the abolition of tekkes in 1925, the mosque and tekke were closed and the two guesthouse buildings are used as a primary school, Şair Nedim Primary School. Due to extensive wear over the years, all the buildings are closed in 1960. The mosque has been restored between 1969 and 1973 by the General Directorate for Foundations of the Republic of Turkey and it is opened to public in 1973. Recently, all the buildings except the guesthouses have undergone through another restoration process. The restoration is started in 2008 and lasted for two years. The mosque and türbe opened to the public on 21 May 2010 by President Abdullah Gül., both the guesthouses are currently in a ruined state and are not used.
Architecture
The mosque and the guesthouses are wooden constructions and represents the classical architecture of the late Ottoman period. The türbe, library, and the fountain are built in the Art Nouveau style.