The mosque is a Muslim prayer architectural structure. The mosque serves as a gathering place for Muslims to perform collective prayers. In addition, mosques can be places for gathering people, learning the basics of the Islamic religion. The first mosque was the Kaaba. According to the prophet Muhammad, after the Kaaba, the al-Aqsa mosque was built in al-Quds (Jerusalem). These two mosques, as well as the Prophet's Mosque in Medina, are places of pilgrimage for Muslims.