People have lived around the Acropolis rock for at least 5,000 years. By 1400 BC it carried a Mycenaean fortress, and stretches of its Cyclopean walls still show. The founding myth says Athena won the city by giving it olive trees, and took the vote by a single ballot.
Unrest in the 6th century BC led to Solon's reforms and, in 508 BC, to democracy under Cleisthenes. The assembly met on the Pnyx, the rocky hill west of the Acropolis, where up to 13,000 citizens could listen to Pericles. Athens then beat Persia at Marathon in 490 BC and at Salamis in 480 BC.
The golden age followed. An ambitious building programme raised the Parthenon and the rest of the Acropolis, and Aeschylus, Sophocles and Euripides flourished alongside Socrates and Plato. Defeat by Sparta in the Peloponnesian War (431–404 BC) came next, and in 338 BC Philip II of Macedon and his son Alexander beat an alliance led by Athens and Thebes at Chaeronea.
Rome let Athens run itself out of respect for its schools. Hadrian, who held Athenian citizenship, added public buildings in the 2nd century AD, and his arch still stands beside the Temple of Olympian Zeus. Raids in 267 and 396 shrank the town, and when Justinian banned pagan philosophy teaching in 529, the ancient city's story is usually said to end.
Under Byzantium the temples became churches. The 11th and 12th centuries brought a boom in soap and dye making, and almost every important Middle Byzantine church in and around the city went up then, including the Holy Apostles in the Agora. Crusaders took the city in 1204, and Latin lords held it until 1458.
Sultan Mehmed II took Athens in 1458 and turned the Parthenon into a mosque. The Ottomans later stored gunpowder inside it, so when a Venetian shell hit in 1687 the explosion left the ruin you see today. Lord Elgin's men then removed many of its sculptures between 1800 and 1803 and shipped them to England.
After the War of Independence, Athens was a town of about 4,000 people huddled in today's Plaka when it replaced Nafplio as capital in 1834. A Bavarian king had a new city planned around the Acropolis, Kerameikos and his palace, now Parliament, and architects such as Hansen and Ziller added many neoclassical buildings. More than a million refugees from Asia Minor reached Greece after 1922, and suburbs such as Nea Smyrni began as their settlements.
The occupation in the Second World War brought famine, and communist and government forces fought in the city soon after. Post-war migrants from the villages and islands came for work, and in the 1960s and 1970s many neoclassical buildings were demolished for office blocks. Traffic vibration and air pollution were corroding the marble. A new metro, airport and car limits followed, and a network of pedestrian streets now links the ancient sites. Line 4 of the metro is due in 2029.