the governor at Tripoli, but shortly after 1711, it fell under the Karamanli sultanate until 1835, when it became a dependency of the autonomous sanjak of Benghazi, essentially Cyrenaica, which was governed directly from Constantinople. This in turn, in 1875, became the vilayet of Cyrenaica. In the 1850s, it had an estimated 4,500 inhabitants, who lived by agriculture, fishing and the coastal trade. The oldest mosque in Derna is Al-masjeed al-ateeq, or the "Old Mosque", restored by wali Mahmoud Karamanli in 1772, vaulted with 42 small cupolas. This kind of vault was in use due to lack of some materials, like timber or stone in the region of Cyrenaica. There is another mosque, named Masjeed az-zawiyah, built in 1846, more strictly curved in the side of a hill. The French admiral Gantheaume landed at Derna in June 1800 in an attempt to reinforce Napoleon in Egypt by bringing troops overland, but was rebuffed by the local garrison. Derna was the location of the 1805 Battle of Derne, in which forces under U.S. Lieutenant and former Consul to Tripoli William Eaton—who had marched across the Libyan Desert from Alexandria—captured the city as part of the First Barbary War. Italian occupation On 16 October 1911, Italian troops occupied Derna during the Italo-Turkish War. The Italian rule over Derna lasted 29 years, 3 months, and 14 days until it was captured on 30 January 1941 by Australian Troops during the Second World War's North African Campaign On 6 April 1941, German forces retook the city from the British, and on 15 November 1942, British forces recaptured it. Libyan Republic and civil war In 2007, American troops in Iraq uncovered a list of foreign fighters for the Iraqi insurgency. Of the 112 Libyans on the list, 52 had come from Derna. Derna has the reputation of being the most fundamentalist Muslim city in Libya. Following mass protests on 18 February 2011, the city came under the control of the National Transitional Council, breaking from the Libyan government. The city was never retaken before Gaddafi's ouster from Tripoli and the establishment of a new government. In October 2014, local militants affiliated with the Islamic Youth Shura Council publicly pledged allegiance to Abu Bakr al-Baghdadi, the leader of the Islamic State (IS). In November 2014, al-Baghdadi released an audio-recording accepting the pledge of allegiance and announced the expansion of his group. In June 2015 Shura Council