Megara (; , ) is a historic town and a municipality (pop. 36,924 in 2011) 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, Pegae, to the west on the
Corinthian Gulf and
Nisaea, to the east on the
Saronic Gulf of the Aegean Sea.