ass="MsoNormal">In 635 CE Gaza was quickly besieged and captured by the Rashidun
army under general 'Amr ibn al-'As following the Battle of Ajnadayn between the
Byzantine Empire and the Rashidun Caliphate in central Palestine. Believed to
be the site where Muhammad's great grandfather Hashim ibn Abd Manaf was buried,
the city was not destroyed by the victorious Rashidun army despite the stiff
and lengthy resistance. The arrival of the Muslim Arabs brought drastic changes
to Gaza; at first some of her churches were transformed into mosques, including
the present Great Mosque of Gaza (the oldest in the city), a large segment of
the population swiftly adopted Islam, Arabic became the official language. In
767 Muhammad ibn Idris ash-Shafi'i was born in Gaza and lived his early
childhood there; al-Shafi'i founded a prominent Sunni Muslim legal philosophy
(or fiqh) called Shafi'i, in his honor. Security was the key to Gaza's
prosperity which had been maintained in the early rule of the Muslims. Although
alcohol was banned in Islam, the Jewish and Christian communities were allowed
to maintain wine production and grapes, a major cash crop in the city, were
exported mainly to Egypt. Because it bordered the desert, Gaza was vulnerable
to warring nomadic groups. In 796 Gaza was destroyed during a civil war between
the Arab tribes of the area. However, by the 10th century CE the city had been
rebuilt by a third Arab caliphate ruled by the Abbasids; Arab geographer al-Muqaddasi
described Gaza as "a large town lying on the highroad to Egypt on the
border of the desert." In 977 a fourth Arab caliphate ruled by the Fatimids
established an agreement with the competing Seljuk Turks, whereby the Fatimids
would control Gaza and the land south of it, including Egypt.
European Crusaders conquered the city from the Fatimids in
1100 and King Baldwin III built a castle used by the Knights Templar in Gaza in
1149. He also had the Great