In the history of Islam, the first religious Waqf is the mosque of Quba’ in Madinah which was built upon the arrival of the Prophet, pbuh Muhammad, pbuh, pbuh. It stands now on the same site with a new and enlarged structure. Six months later, Quba’ was followed by the mosque of the Prophet, pbuh in the center of Madinah. Mosques and real estates confined for providing revenues to spend on mosques’ maintenance and operating expenses are in the category of religious Waqf.
Source: BEGINNING AND KINDS OF WAQF