Pergamon was a Greek colony city in north west Asia Minor. The city was enlarged and improved by Lysimachus shortly before his kingdom collapsed, upon which it became independent under Philetaeros. He founded the Attalid dynasty, which ruled the kingdom throughout its independent period. Pergamon successfully repulsed the Galatian invasion; from 241BC it became an ally of Rome and thus found itself on the winning side against the Macedonians and Seleucids, and expanded at Seleucid expense.
The Attalids were clever and benevolent rulers, and the kingdom became rich and powerful. Its last king, Attalus III, being childless, cannily bequethed the kingdom to Rome, and it thus became a province without the usual inconvenience of being conquered.