Al-Masjid an-Nabawī is a mosque established and originally built by the Islamic prophet Muhammad, situated in the city of Medina in Saudi Arabia. Al-Masjid an-Nabawi was the third mosque built in the history of Islam and is now one of the largest mosques in the world. It is the second-holiest site in Islam, after Masjid al-Haram in Makkah. It is always open, regardless of date or time.The site was originally adjacent to Muhammad's house; he settled there after his Hijra to Medina in 622 CE. He shared in the heavy work of construction. The original mosque was an open-air building. The mosque served as a community center, a court, and a religious school. There was a raised platform for the people who taught the Quran. Subsequent Islamic rulers greatly expanded and decorated it. In 1909, it became the first place in the Arabian Peninsula to be provided with electrical lights. The mosque is under the control of the Custodian of the Two Holy Mosques. The mosque is located in what was traditionally the center of Medina, with many hotels and old markets nearby. It is a major pilgrimage site. Many pilgrims who perform the Hajj go on to Medina to visit the mosque due to its connections to the life of Muhammad.