Legendary Philistine roots According to tradition, the mosque stands on the site of the
Philistine temple dedicated to
Dagon—the god of fertility—which
Samson toppled in the
Book of Judges. Later, a temple dedicated to
Marnas—god of rain and grain—was erected. Local legend today claims that Samson is buried under the present mosque.
Byzantine church A Christian
basilica was built on the site in the 5th century
CE, either during the reign of
Eastern Roman Empress Aelia Eudocia, or Emperor
Marcianus. In either event, the basilica was finished and appeared on the 6th-century
Madaba Map of the Holy Land. after the conquest of
Roman Palaestina by the
Rashidun Caliphate. On 5 December 1033, an
earthquake caused the pinnacle of the mosque's minaret to collapse.
Crusader church In 1149, the
Crusaders, who had conquered Gaza in 1100, built a large church atop the ruins of the earlier Byzantine church upon a decree by
Baldwin III of Jerusalem. However, in
William of Tyre's descriptions of grand Crusader churches, it is not mentioned. Based on a Jewish
bas-relief accompanied by a
Hebrew and
Greek inscription The discovery of a
6th-century synagogue at
Maiumas, the ancient port of Gaza, in the 1960s make local re-use of this column much likelier. The relief on the column depicted Jewish cultic objects - a
menorah, a
shofar, a
lulav and
etrog - surrounded by a decorative wreath, and the inscription read "Hananyah son of Jacob" in both Hebrew and Greek. In 1187, the
Ayyubids, under
Saladin wrested control of Gaza from the Crusaders and destroyed the church.
Mamluk mosque The
Mamluks reconstructed the mosque in the 13th century. In 1260, the
Mongols destroyed it. A later Mamluk governor of the city,
Sanjar al-Jawli, commissioned the restoration of the Great Mosque sometime between 1311 and 1319. The Mamluks rebuilt the mosque completely in 1340. In 1355,
Muslim geographer
Ibn Battuta noted the mosque's former existence as "a fine Friday mosque," and said that al-Jawli's mosque was "well-built." Inscriptions on the mosque bear the signatures of the Mamluk sultans
al-Nasir Muhammad (dated 1340),
Qaitbay (dated May 1498),
Qansuh al-Ghawri (dated 1516), and the
Abbasid caliph
al-Musta'in Billah (dated 1412).
Ottoman period In the 16th century, the mosque was restored after apparent damage in the previous century. The
Ottomans commissioned its restoration and built six other mosques in the city. They had been in control of Palestine since 1517. The Great Mosque was severely damaged by
Allied forces while attacking the Ottoman positions in Gaza during
World War I. The British claimed that Ottoman munitions were stored in the mosque which exploded in the bombardment.
British Mandate Under the supervision of
former Gaza mayor Sa'id al-Shawwa, In 1928, the Supreme Muslim Council held a mass demonstration of Muslims and
Christians at the Great Mosque in support for boycotting elections and participation in the Legislative Assembly of the
British Mandate of Palestine government. To increase the number of people in the rally, they ordered all the mosques in one of Gaza's quarters to temporarily close.
Post-1948 The ancient inscriptions and
bas-relief of Jewish religious symbols were chiseled away intentionally between 1973 and 1993. During the
Battle of Gaza between the
Palestinian organizations of
Hamas and
Fatah, the mosque's pro-Hamas
imam Mohammed al-Rafati was shot dead by Fatah gunmen on 12 June 2007, in retaliation for the killing of an official of
Mahmoud Abbas's presidential guard by Hamas earlier that day.
Gaza war and genocide The mosque was heavily damaged, with some sources describing it as destroyed, by Israeli bombardment during the
Gaza war and
Gaza genocide. The Israeli military said that it attacked “a Hamas military compound and an anti-tank missile array” at the site. It said it attacked a militant tunnel at the Omari mosque. It did not provide proof in either case. Photographs show the central section of the mosque fully collapsed, with its minaret partially toppled. While Gaza was under Israeli fire, Palestinians recovered some of the manuscripts from the mosque. By January 2024
UNESCO had confirmed damage to the mosque through remote assessment of the war's impact on heritage sites in Gaza; by February 2026 UNESCO had identified damage at more than 150 sites in the Gaza Strip. After the
January 2025 ceasefire agreement, Palestinians near the area started to restore the mosque. Work resumed after the
October ceasefire began, with work focusing on clearing rubble with repairs waiting until supplies enter Gaza. Previous work digitising manuscripts in the library's collection meant that many were stored in resilient containers and 148 out of 228 manuscripts survived. ==Architecture==