In 642, during the Arab conquest of Iran, a famous battle was fought at Nahavand. With heavy losses on both sides, it eventually resulted in a Sasanian defeat, and as such, opened up the doors of the Iranian plateau to the invaders. In the early Islamic period, Nahavand flourished as part of the province of Jibal. It first functioned as administrative center of the Mah al-Basra ("Media of the Basrans") district. Its revenues were reportedly used for the payment of the troops from Basra that were stationed in Nahavand. Medieval geographers mention Nahavand as an affluent commercial hub with two Friday mosques. When the 10th century Arab traveller Abu Dulaf travelled through Nahavand he noted "fine remains of the [ancient] Persians". Abu Dulaf also wrote that during the reign of Caliph al-Ma'mun (813–833), a treasure chamber had been found, containing two gold caskets.