|Regional unit||West Attica|
|o Mayor||Grigorios Stamoulis|
|o Municipality||330.1 km2 (127.5 sq mi)|
|o Municipal unit||322.2 km2 (124.4 sq mi)|
|Elevation||4 m (13 ft)|
|o Municipality density||110/km2 (290/sq mi)|
|o Municipal unit||28,591|
|o Municipal unit density||89/km2 (230/sq mi)|
|Time zone||UTC+2 (EET)|
Megara (; Greek: , pronounced ['me?ara]) is a historic town and a municipality in West Attica, Greece. It lies in the northern section of the Isthmus of Corinth opposite the island of Salamis, which belonged to Megara in archaic times, before being taken by Athens. Megara was one of the four districts of Attica, embodied in the four mythic sons of King Pandion II, of whom Nisos was the ruler of Megara. Megara was also a trade port, its people using their ships and wealth as a way to gain leverage on armies of neighboring poleis. Megara specialized in the exportation of wool and other animal products including livestock such as horses. It possessed two harbors, Pagae to the west on the Corinthian Gulf, and Nisaea to the east on the Saronic Gulf of the Aegean Sea. It is part of Athens metropolitan area.
According to Pausanias, the Megarians said that their town owed its origin to Car, the son of Phoroneus, who built the citadel called 'Caria' and the temples of Demeter called Megara, from which the place derived its name.
In historical times, Megara was an early dependency of Corinth, in which capacity colonists from Megara founded Megara Hyblaea, a small polis north of Syracuse in Sicily. Megara then fought a war of independence with Corinth, and afterwards founded Chalcedon in 685 BC, as well as Byzantium (c. 667 BC).
Megara is known to have early ties with Miletos, in the region of Caria in Asia Minor. According to some scholars, they had built up a "colonisation alliance". In the 7th/6th century BCE these two cities acted in concordance with each other.
Both cities acted under the leadership and sanction of an Apollo oracle. Megara cooperated with that of Delphi. Miletos had her own oracle of Apollo Didymeus Milesios in Didyma. Also, there are many parallels in the political organisation of both cities.
In the late 7th century BC Theagenes established himself as tyrant of Megara by slaughtering the cattle of the rich to win over the poor. During the second Persian invasion of Greece (480-479 BC) Megara fought alongside the Spartans and Athenians at crucial battles such as Salamis and Plataea.
Megara defected from the Spartan-dominated Peloponnesian League (c. 460 BC) to the Delian league due to border disputes with its neighbour Corinth; this defection was one of the causes of the First Peloponnesian War (460 - c. 445 BC). By the terms of the Thirty Years' Peace of 446-445 BC Megara was forced to return to the Peloponnesian League.
In the (second) Peloponnesian War (c. 431 - 404 BC), Megara was an ally of Sparta. The Megarian decree is considered to be one of several contributing "causes" of the Peloponnesian War. Athens issued the Megarian decree, which banned Megarian merchants from territory controlled by Athens; its aim was to constrict the Megarian economy. The Athenians claimed that they were responding to the Megarians' desecration of the Hiera Orgas, a sacred precinct in the border region between the two states.
Arguably the most famous citizen of Megara in antiquity was Byzas, the legendary founder of Byzantium in the 7th century BC. The 6th century BC poet Theognis also came from Megara. In the early 4th century BC, Euclid of Megara founded the Megarian school of philosophy which flourished for about a century, famous for the use of logic and dialectic.
During the Celtic invasion in 279 BC, Megara sent a force of 400 peltasts (light infantrymen) to Thermopylae. During the Chremonidean War, in 266 BC, the Megarians were besieged by the Macedonian king Antigonus Gonatas and managed to defeat his elephants employing burning pigs. Despite this success, the Megarians had to submit to the Macedonians.
In 243 BC, exhorted by Aratus of Sicyon, Megara expelled its Macedonian garrison and joined the Achaean League, but when the Achaeans lost control of the Isthmus in 223 BC the Megarians left them and joined the Boeotian League. Not more than thirty years later, however, the Megarians grew tired of the Boeotian decline and returned their allegiance to Achaea. The Achaean strategos Philopoemen fought off the Boeotian intervention force and secured Megara's return, either in 203 or in 193 BC.
The Megarians were proverbial for their generosity in building and endowing temples. Saint Jerome reports "There is a common saying about the Megarians [...:] 'They build as if they are to live forever; they live as if they are to die tomorrow.'"
Megara seems to have experienced democracy on two occasions. The first was between 427 BC, when there was a democratic uprising, and 424 BC, when a narrow oligarchy was installed (Thuc. 3.68.3; 4.66-8, 73-4). The second was in the 370s BC, when we hear that the people of Megara expelled some anti-democratic conspirators (Diod. 15.40.4). By the 350s BC, though, Isocrates is referring to Megara in terms that suggests that it was an oligarchy again (Isoc. 8.117-19).
One of the first actions of the new oligarchy in 424 BC was to compel the people to vote openly, which suggests that the democracy had made use of the secret ballot. Megarian democracy also made use of ostracism. Other key institutions of the democracy included a popular Assembly and Council, and a board of five (or six) generals.
Megara is located in the westernmost part of Attica, near the Megara Gulf, a bay of the Saronic Gulf. The coastal plain around Megara is referred to as Megaris, which is also the name of the ancient city state centered on Megara. Megara is 8 km west of Nea Peramos, 18 km west of Eleusis, 19 km east of Agioi Theodoroi, 34 km west of Athens and 37 km east of Corinth. The Motorway 8 connects it with Athens and Corinth. The Megara railway station is served by Proastiakos suburban trains to Athens and Kiato. There is a small military airfield south of the town, ICAO code LGMG.
The main town Megara had 23,456 inhabitants at the 2011 census. The largest other settlements in the municipal unit are Vlychada (pop. 1,462), Kineta (1,446), Pachi (542) and Lakka Kalogirou (517).
The municipality has an area of 330.11 km2, the municipal unit 322.21 km2.