House of worship built on the site of Muhammad 's house in Medina , considered one of the three holiest places of Islam .
It was originally a simple brick structure surrounding an enclosed courtyard where people gathered to hear Muhammad. Muhammad later built roofed galleries to shelter his visitors, and in 628 a pulpit was added to raise him above the crowd. In 706 Caliph al-Walīd I pulled down the original building and built a mosque on the site, which contains Muhammad's tomb. The mosque served as the model for later Islamic architecture.