The Seleucid Empire, the largest of Alexander's territories, and which included Anatolia, became involved in a disastrous war with Rome culminating in the battles of Thermopylae and Magnesia. The resulting Treaty of Apamea in (188 BC) saw the Seleucids retreat from Anatolia. The Kingdom of Pergamum and the Republic of Rhodes, Rome's allies in the war, were granted the former Seleucid lands in Anatolia. Anatolia subsequently became contested between the neighboring rivalling Romans and the Parthian Empire, which frequently culminated in the Roman-Parthian Wars