Located in a fertile, mountain-walled valley, the city-state of Sparta was created by invading Dorian Greeks, who later conquered the countryside of Laconia and Messenia (c.735–715 B.C.). For a long time the Spartans had no city walls, trusting to the strength of their army for defense against invaders and against their own Laconian and Messenian subjects. In the 7th cent. B.C. Sparta enjoyed a period of wealth and culture, the time of the poets Tyrtaeus and Alcman. After 600 B.C., however, Sparta cultivated only the military arts, and the city became an armed camp, established (according to the official legend) by Lycurgus, in reaction to a Messenian revolt (see Messenia).
By the 6th cent. B.C., Sparta was the strongest Greek city. In the Persian Wars, Sparta fought beside Athens, first at Thermopylae (480), under Leonidas; later that year at Salamis; and in 479 at Plataea (won by Pausanias). Before 500 B.C., Sparta had formed a confederacy of allies (the Peloponnesian League), which it dominated. Through the league and by direct methods Sparta was master of most of the Peloponnesus.
After the Persian Wars rivalry with Athens sharpened, and Athens grew stronger. An earthquake at Sparta (464 B.C.), followed by a stubborn Messenian revolt, greatly weakened Sparta. In the end a contest with Athens came indirectly, provoked by Corinthian fears of Athenian imperialism. This was the great Peloponnesian War (431–404 B.C.), which wrecked the Athenian empire.
Soon after their victory over Athens the dominant Spartans, led by Agesilaus II, were involved in a war with Persia; then the Spartan envoy Antalcidas concluded (386 B.C.) a treaty with Artaxerxes II by which Sparta surrendered the Greek cities of Asia Minor in return for withdrawal of Persian support from the Athenians, who were again at war with Sparta, and from the Athenians' allies, the Thebans. Thebes fought on and by the victory at Leuctra (371 B.C.) gained ascendancy in Greece. Sparta fell an easy prey to Macedonia and declined. In the 3d cent. B.C. there were determined but futile attempts by kings Agis IV (see under Agis) and Cleomenes III and by Nabis (d. 192 B.C.) to restore glory to Sparta by vigorous reforms. Under the Romans, Sparta prospered. It was devastated by the Goths in A.D. 395. The ruins of old Sparta, including sanctuaries and a theater, remain near the modern city of Sparta.