01

Two mosques from the first year

When the Prophet Muhammad left Mecca for Medina in 622, he stopped at the village of Quba on the city’s edge and laid the foundations of a mosque there. Muslim tradition regards Quba as the first mosque built in Islam. Days later, in the centre of Medina, he helped build a simple courtyard of mud brick with a roof of palm trunks and fronds. That became the Prophet’s Mosque, today one of the largest buildings on Earth after centuries of expansion. Neither original structure survives, but both sites have been used for prayer without interruption since the year of the Hijra.

02

Medina and the change of direction

A third Medina mosque, Masjid al-Qiblatayn, takes its name from an event in Islamic history. Its name means the mosque of the two qiblas. Tradition holds that worshippers there turned during a single prayer from facing Jerusalem to facing the Kaaba in Mecca, after the direction of prayer was changed in the second year of the Hijra. The building visitors see today is a modern reconstruction completed in the late twentieth century. The Kaaba and the Sacred Mosque around it in Mecca are older still as a place of worship, but they are usually treated separately, because Islamic tradition dates the sanctuary itself to long before the Prophet’s time.

03

Arabia beyond the Hijaz

The oldest mosque in eastern Arabia stands in the Al-Ahsa oasis of Saudi Arabia, not far from the Gulf coast. The Jawatha Mosque is thought to have been built around 629 by the Abd al-Qays tribe, who embraced Islam early. Tradition holds that the first Friday prayer held outside Medina took place there. The building has been restored on its old foundations. Al-Ahsa itself became a UNESCO World Heritage Site in 2018 as a cultural landscape of palm groves, springs and historic buildings. For readers in the Gulf, Jawatha is a reminder that Islam’s early history reached the eastern shores of the peninsula within a few years.

04

Garrison cities and conquests

As Muslim armies moved into Iraq, Egypt and North Africa, new towns were founded around congregational mosques. The Great Mosque of Kufa, in Iraq, was laid out with the garrison city in about 638. In Egypt, the Mosque of Amr ibn al-As was built around 642 at Fustat, the settlement that later grew into Cairo; it is often described as the first mosque in Africa. The Great Mosque of Kairouan in Tunisia followed in about 670. Its present prayer hall and square minaret date mostly from the ninth century, but UNESCO describes it as one of the major monuments of Islam and a model for many later mosques in the Maghreb.

05

China and the disputed claims

Two Chinese mosques appear in the table with traditional dates. The Huaisheng Mosque in Guangzhou is said to have been founded in 627 by a companion of the Prophet who travelled to China, and its tall, smooth minaret was once used as a lighthouse for ships. Historians doubt the early date and suggest the building is several centuries younger. The Great Mosque of Xi’an carries a traditional date of 742. A mosque in Massawa, Eritrea, known as the Mosque of the Companions, also claims a seventh-century origin linked to early Muslims who sought refuge in Abyssinia, but its age cannot yet be confirmed with any confidence.

06

Why the dates are uncertain

Ranking early mosques is harder than ranking mountains, because the evidence is mostly written tradition rather than surviving stone. Simple early mosques were made of mud brick, palm wood and reed, materials that last only decades. Successive rulers then rebuilt and enlarged important mosques as communities grew. The Umayyad Mosque in Damascus, completed around 715, is a rare case in which much of the early structure and its mosaics still survive. In most other cases, the date refers to the founding of a site of prayer, not to a building. Archaeology, inscriptions and comparisons of old plans help scholars test these claims, and some dates will continue to be debated.

FOLLOW THE EVIDENCE

Sources & further reading

Figures are rounded and widely published; check the linked organisations for the latest editions. These organisations do not endorse this website.