Book 1
39.4
Next to Eleusis is the district called Megaris. This too belonged to Athens in ancient times, Pylas the king having left it to Pandion. My evidence is this; in the land is the grave of Pandion, and Nisus, while giving up the rule over the Athenians to Aegeus, the eldest of all the family, was himself made king of Megara and of the territory as far as Corinth. Even at the present day the port of the Megarians is called Nisaea after him. Subsequently in the reign of Codrus the Peloponnesians made an expedition against Athens. Having accomplished nothing brilliant, on their way home they took Megara from the Athenians, and gave it as a dwelling-place to such of the Corinthians and of their other allies as wished to go there.
39.5
In this way the Megarians changed their customs and dialect and became Dorians, and they say that the city received its name when Car the son of Phoroneus was king in this land. It was then they say that sanctuaries of Demeter were first made by them, and then that men used the name Megara (Chambers). This is their history according to the Megarians themselves. But the Boeotians declare that Megareus, son of Poseidon, who dwelt in Onchestus, came with an army of Boeotians to help Nisus wage the war against Minos; that falling in the battle he was buried on the spot, and the city was named Megara from him, having previously been called Nisa.