In ancient times Megara formed one of the four divisions of Attica. It was next conquered by the Dorians, and was for a time subject to Corinth; but it finally asserted its independence, and rapidly became a wealthy and powerful city. Its power at an early period is attested by the flourishing colonies which it founded, of which Selymbria, Chalcedon, and Byzantium, and the Hyblaean Megara in Sicily, were the most important.
After the Persian wars, Megara was for some time at war with Corinth, and was thus led to form an alliance with Athens, and to receive an Athenian garrison into the city, B.C. 461; but the oligarchical party having got the upper hand, the Athenians were expelled, B.C. 441.
Megara is celebrated in the history of philosophy as the seat of a philosophical school, usually called the Megarian, which was founded by Euclid, a native of the city. (Harpers Dictionary of Classical Antiquities, 1898)
The town of Megara, the capital of Megaris, a small district in Greece between the Corinthian and Saronic Gulfs, bounded on the north by Boeotia, on the east and northeast by Attica, on the south by the territory of Corinth, and situated a mile from the sea, opposite the island of Salamis. Its citadel was called Alcathoë, from its reputed founder, Alcathoüs, son of Pelops. Its seaport was Nisaea, which was connected with Megara by two walls, built by the Athenians when they had possession of Megara, B.C. 461-445. In front of Nisaea lay the small island Minoa, which added greatly to the security of the harbour.