While the area around Attica was inhabited during the Upper Paleolithic period (30000–10000 BC), archaeological evidence suggests that the small caves around the Acropolis rock and the Klepsythra spring were in use during the Neolithic period (3000–2800 BC).
Greece was the first area in Europe where advanced early civilizations emerged, beginning with the Cycladic civilization on the islands of the Aegean Sea at around 3000 BC, the Minoan civilization in Crete (2700–1500 BC) and then the Mycenaean civilization on the mainland (1900–1100 BC). The period between 1200 and 800 BC is known as the Greek Dark Ages following the supposed Dorian invasion, which marked the end of the Mycenean era. Two of the most celebrated works of Greek literature, the Illiad and the Odyssey by Homer, were written during that period.
The end of the dark age of Greece saw the emergance of various kingdoms and city-states across the Greek peninsula which spread to the shores of the Black Sea, South Italy (known in Latin as Magna Graecia, or Greater Greece) and Asia Minor, reaching great levels of prosperity that resulted in an unprecedented cultural boom, that of classical Greece, expressed in architecture, drama, science and philosophy, and nurtured in Athens under a democratic environment. However, the fact that Greece was not a unified country meant that conflict between the Greek states was common. The most devastating of intra-Greek wars in classical antiquity was the Peloponnesian War, which marked the demise of the Athenian Empire as the leading power in ancient Greece.
By 500 BC, the Persian Empire controlled territories ranging from what is now northern Greece and Turkey all the way to Iraq, and posed a threat to the Greek states. Failed attempts by the Greek city-states of Asia Minor to overthrow Persian rule failed, and Persia invaded the states of mainland Greece in 492 BC, but was forced to withdraw after a defeat at the Battle of Marathon. A second invasion followed in 480 BC. Despite a heroic resistance at Thermopylae by Spartans and other Greeks, Persian forces sacked Athens. Following successive Greek victories in 480 and 479 BC at Salamis, Plataea and Mycale, the Persians were forced to withdraw for a second time. The military conflicts, known as the Greco-Persian Wars, were led mostly by Athens and Sparta. Both were later overshadowed by Thebes and eventually Macedon, with the latter uniting the Greek world in the League of Corinth (also known as the Hellenic League or Greek League) under the guidance of Phillip II, who was elected leader of the first unified Greek state in the history of Greece