was immigration by a Greek tribe called the Akhaioi (from the northern Peloponnese) to the area, after the Trojan War, and eventually many Greek settlements built up along the coast and inland. In the Hellenistic period, the western parts of the later Antalya were regarded as Lycia, whereas the east was Pamphylia, and the extremes east Cilicia, while Pisidia was to the north. These communities grew into independent cities, and a eventually a federation was set up, under the name of Pamphylia. Before the Ancient Roman conquest Lycia was a polity with the first democratic constitution in the world, which later partly inspired the U.S. Constitution. Antalya was part of the Lydian kingdom from the 7th century BC until Lydia was defeated by the Achaemenid Empire during the Battle of Sardis in 546 BC. The Macedonian commander Alexander the Great ended Persian rule and in around 334 BC conquered the cities of the area one by one—except for Termessos and Sillyon which managed to repulse his armies in 333 BC. After the death of Alexander in 323 BC, a long battle erupted between his generals that lasted until 188 BC. The reign of the kingdom of Pergamon began with the defeat of the Seleucid army at Apamea. Shortly after this the city of Antalya was founded. When Attalos III, the last king of Pergamom, died in 133 BC he left his kingdom to the Roman Republic. At this time the area is dominated by pirates based in small cities along the coast. The Byzantines During the mid-Byzantine era (the 5th and 6th centuries) the city of Antalya grew beyond the city walls. From the early Muslim conquests of the 7th century Muslim Arabs started to be dominant in the Levant region and Antalya later played a part in the Christian Crusades against Islam. The army of King Louis VII of France sailed from Antalya for Syria during the Second Crusade in 1148, and the fleet of Richard I of England rallied here before the conquest of Cyprus during the Third Crusade. In the late 11th and early 12th Century much of the area of the modern province fell to the Turks especially the Danishmends. From 1120 to March 1207, Antalya was again under the sovereignty of Byzantines. The Seljuk Turks The area was conquered by the Seljuk Turks and recaptured by the Byzantines again and again from 1076 onwards as