In classical antiquity, Laconia was regarded as the region that belonged directly to the city-state of Sparta, after the surrounding cities had been subjected in a number of phases since the foundation of Sparta by the Dorians. In the early 8th century, the (then still Achaic) city-state of Amyklai was first annexed, after which the Spartan king Teleklos soon (almost) subjugated the rest of Laconia. The original population was hereby reduced to second-class citizenship as perioikoi, with the primary duty to follow the Spartan kings in their continuing military actions, but without voting rights in the popular assembly or heliaia. In the second half of the 8th century, the Spartans conquered neighboring Messenia in a 20-year lasting war. The territory of the Messenians was divided into 9000 more or less equal parts and divided among the Spartan citizens, while the Messenians themselves were forced to work these lands as helots (in fact a kind of serfs) and to give half of their income to their masters. This in particular freed the Spartans from the need to work their fields themselves and allowed them to focus entirely on military service, with the men spending almost their entire working lives in military service (and the barracks). The professional army that was created in this way dominated all its opponents for almost the entire classical period, and led to the hegemony of Sparta in the Peloponnese. The establishment of the Peloponnesian League, with allies such as Corinth, Megara, Elis under the leadership of the Spartans, gave the Spartans even more power, which ultimately led to the victory in the disastrous Peloponnesian War in Greece, against Athens which was equally expansive. For a part of the 4th century B.C. Sparta was  the de factual captain of Greece, until the Biotic Thebes under General Epameinondas managed to defeat the Spartans several times militarily, and to remove Messenia and Arkadia from Spartan influence by establishing the heavily fortified cities of Messene and Megalopolis. The liberation of the perioikoi-towns and the establishment of a League of Free Laconians finally ended the Spartan rule of Laconia itself.