Encouraged by the Aetolian League and their calls to liberate Greece from the Romans, the Seleucid king Antiochus III landed with his army at Demetrias, Thessaly in 192 BC, and was elected "strategos" by the Aetolians. However, Philip V of Macedon maintained his alliance with the Romans, along with the Achaean League, Rhodes, Pergamon, and Athens. The Romans defeated the Seleucids in the 191 BC Battle of Thermopylae as well as the Battle of Magnesia in 190 BC, forcing the Seleucids to pay a war indemnity, dismantle most of its navy, and abandon its claims to any territories north or west of the Taurus Mountains in the Treaty of Apamea in 188 BC. In 191–189 BC, Philip V, with Rome's acceptance, was able to capture some cities in central Greece that had been allied to Antiochus III, while Rhodes and Eumenes II () of Pergamon gained significantly larger territories in Asia Minor.