In the 7th century, the Umayyad Arab Muslims entered into the area now known as Afghanistan after decisively defeating the Sassanians in the Battle of Nihawand (642 AD). Following this colossal defeat, the last Sassanid Emperor, Yazdegerd III, became a hunted fugitive and fled eastward deep into Central Asia. In pursuing Yazdegerd, the Arabs chose to enter the area from north-eastern Iran and thereafter into Herat, where they stationed a large portion of their army before advancing toward the rest of Afghanistan. The Arabs exerted considerable efforts toward propagating Islam amongst the locals.