The remains of prehistoric Samarra were first excavated between 1911 and 1914 by the German archaeologist Ernst Herzfeld. Samarra became the type site for the Samarra culture. Since 1946, the notebooks, letters, unpublished excavation reports and photographs have been in the Freer Gallery of Art in Washington, D.C. The civilization flourished alongside the Ubaid period, as one of the first town states in the Near East. It lasted from 5,500 BCE and eventually collapsed in 3,900 BCE. Neo-Assyrian period A city of Sur-marrati (refounded by Sennacherib in 690 BC according to a stele in the Walters Art Museum) is insecurely identified with a fortified Assyrian site at al-Huwaysh on the Tigris opposite modern Samarra. The State Archives of Assyria Online identifies Surimarrat as the modern site of Samarra
In 836 CE, the Abbasid Caliph Al-Mu’tasim founded a new capital at the banks of the Tigris. Here he built extensive palace complexes surrounded by garrison settlements for his guards, mostly drawn from Central Asia and Iran (most famously the Turks, as well as the Khurasani Ishtakhaniyya, Faraghina and Ushrusaniyya regiments) or North Africa (like the Maghariba). Although quite often called Mamluk slave soldiers, their status was quite elevated; some of their commanders bore Sogdian titles of nobility. Remains of a circular pool surrounded by reception halls in the Dar al-Khilafa palace, built by Al-Mu῾tasim (r. 833–842)[7] The city was further developed under Caliph al-Mutawakkil, who sponsored the construction of lavish palace complexes, such as al-Mutawakkiliyya, and the Great Mosque of Samarra with its famous spiral minaret or Malwiya, built in 847. For his son al-Mu’tazz he built the large palace Bulkuwara. Qasr al-‘Ashiq, an Abbasid-era palace near Samarra The Nestorian patriarch Sargis (860–72) moved the patriarchal seat of the Church of the East from Baghdad to Samarra, and one or two of his immediate successors may also have sat in Samarra so as to be close to the seat of power. Samarra remained the residence of the caliph until 892, when al-Mu’tadid returned the capital to Baghdad. Historical sources report that the city was looted around this time. Its population probably decreased and the city declined, but it remained an important market center