Passage 1.39.5
Μεγαρεῖς μὲν οὕτως ἔθη καὶ φωνὴν μεταβαλόντες Δωριεῖς γεγόνασι, κληθῆναι δὲ οὕτω τὴν πόλιν φασὶν ἐπὶ Καρὸς τοῦ Φορωνέως ἐν τῇ γῇ ταύτῃ βασιλεύοντος· τότε πρῶτον λέγουσιν ἱερὰ γενέσθαι Δήμητρος αὐτοῖς, τότε ἀνθρώπους ὀνομάσαι Μέγαρα. οὕτω μὲν αὐτοὶ περὶ σφῶν Μεγαρεῖς λέγουσι· Βοιωτοὶ δὲ ἐν Ὀγχηστῷ Μεγαρέα τὸν Ποσειδῶνος οἰκοῦντα ἀφικέσθαι στρατιᾷ Βοιωτῶν φασι Νίσῳ τὸν πρὸς Μίνω πόλεμον συνδιοίσοντα, πεσόντα δὲ αὐτὸν ἐν τῇ μάχῃ ταφῆναί τε αὐτοῦ καὶ τῇ πόλει Μέγαρα ὄνομα ἀπὸ τούτου γενέσθαι, πρότερον Νίσᾳ καλουμένῃ.
The Megarians, having thus altered their customs and dialect, became Dorians; they say their city was named after Car, the son of Phoroneus, who once ruled in this land. At that time, they claim, rites of Demeter were first established by them, and at that same period, the inhabitants began to call their city Megara. Thus the Megarians themselves tell the story of their origins. The Boeotians, however, assert at Onchestus that Megareus, a son of Poseidon who lived there, came to Nisos with a Boeotian army to aid him in his war against Minos; Megareus fell in battle and was buried there, and from him the city, previously called Nisa, received the name Megara.