Four more kingdoms formed in what had been eastern Iran. However, Khwarezm was soon conquered by Turkish settlers, while Khorasan, Baktristan and Sakastan were by 960 reunited into a strong empire, ruled first by the Samanid Dynasty and then by the Shansabanids. The east was conquered by the Mongols in the 1220s, who attempted to venture further west but abandoned such ambitions after the 1255 Battle of Arbela.
After this battle the Mehranids, a prominent family from Rey with an illustrious past, began their rise to power, supplanting the Bagratids in Media by 1272. Over the next few decades they conquered the remainder of the Five Kingdoms, and retook much of the east from the Mongols in 1335. The remaining Bagratid territories in the Caucasus were forced to pay tribute and recognise Mehranid overlordship, thus ending the era of the Bagratid Empire.