The site was originally adjacent to Muhammad's house; he settled there after his Hijra (emigration) to Medina in 622 CE. He shared in the heavy work of building. 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.