At the time of the outbreak of the Peloponnesian War, Megara had apparently expelled its oligarchs and established a democracy. It was nonetheless a member of the Peleoponnesian League and an enemy of Athens, showing that self-interest and power invariably trump ideology. An Athenian blockade of Megara was one of the immediate causes of the war.
Megara suffered badly in the war. The city was near to Athens and therefore vulnerable to attack. The Athenians invaded twice a year and laid wast to the countryside. The exiled oligarchs roamed the countryside, harassing and plundering. Within the city, the exiles still had sympathizers. The general public was becoming exhausted from having to fight two foes at once. In 424 B.C., the pro-oligarchic forces therefore proposed allowing the exiles to return and the democratic leaders, fearing that the war-weary public would agree, decided that a deal with the Athenians was the lesser evil. This was not a case of a pro-Spartan oligarchic party and a pro-Athenian popular party. The Athenians must have been thoroughly hated after regularly laying waste to the countryside for the past seven years. Rather, it was a case of the democratic leaders so fearing the return of the men they had exiled that they decided that even the Athenians were preferable.
The leaders therefore agreed to open the gates to the Athenians. But there were two obstacles to a quick Athenian takeover -- opposition from the Megarians who were not in on the plot, and a Peloponnesian garrison. The pro-Athenian Megarians had smeared themselves with oil to mark themselves out, indicating that they expected the takeover to be bloody. The Megarian traitors threw open the gates and killed the guards, and the Athenians, supplemented with some of the displaced Plateans, rushed in. The Athenian herald called on the people to join the revolt. The Peloponnesian garrison panicked and fled to Nisaea, a small outlying port connected to Megara by long walls. What followed is a bit unclear, at least in translation, but it appears that the oligarchs were tipped off and rallied to the cities defense. Once exposed, the conspirators dared not act, and so the Athenians were driven out.
The Athenians then began to besiege the outlying port of Nisaea, believing that if they captured it Megara would soon surrender, presumably because it was cut off from the sea. The people in Nisaea (once again, my translators disagree on whether this refers to the local residents or the Peloponnesian garrison) were cut off from supplies and quickly surrendered on condition that they could be ransomed if they left their arms behind. The Athenians then tore down the long walls.
About this point Brasidas, the Spartan general, showed up, presumably on his march to the Chalcidice. Brasidas knocked at the gate of Megara, but neither party dared let him in, the democrats for fear that he would restore the exiles and the oligarchs for fear that the democrats' fear could set off a civil war. Battle ensued between Brasidas' forces and the Athenians, but the outcome was indeterminate and both sides withdrew. But the oligarchs believed that Brasidas had won and let him in. With the oligarchs firmly in command, both armies withdrew. The conspirators who had let the Athenians in fled. The exiles were restored and pledged to refrain from revenge. However, they soon picked out about a hundred men, both conspirators and personal enemies, and "compelled the people to give sentence on them." Presumably this means that the jury or assembly was coerced or intimidated by the presence of armed men. The exiles then established a narrow oligarchy. No details given. Thucydides only comments, "And this change of government, made by a few upon sedition, did nevertheless continue for a long time after." This is an expression of surprise. I think it is also a mild expression of disapproval. (The comments Thucydides attributes the the Thebans, together with some unfortunate experiences by the Athenians, suggest that he does not approve of very narrow and tight oligarchies). Then again, it could be taken as a suggestion that the oligarchs must have governed well to hold onto power for so long. Besides, the civil war came to an end with the institution of an oligarchy and a truce was soon reached for unrelated reasons that put an end to the general depredations of the Athenians. This must have counted in favor of the oligarchy.
This account is rather bare-bones, but it is what we have to go on. Thucydides says nothing further about the Megarian oligarchy. Megara is briefly mentioned in Plato's Crito along with Sparta, Crete and Thebes as one of the oligarchies Socrates thinks is better governed than Athens yet unaccountably does not want to live in.*
*I love this part of Crito, for a very childish reason. The Dr. Demento piece, Religion and Politics is a very funny verse in which someone responds to all criticisms of our own country by telling the speakers they are full of shit and why don't they go live in Russia or China if they hate the US so much. The speaker says:
I asked him just what did he mean we were all full of shit.The image of Socrates holding such a conversation is doubly delicious. The thought of Socrates from the Platonic dialogues attempting to seriously argue such low invective offers the most charming incongruity. Yet I have to think it is truer to life than Plato. Socrates' conversation partners can't all have been such pushovers as Plato portrays. Nor were they all philosophers debating at schools and other intellectual settings. Socrates stood out in the Agora engaging any passer-by. Someone, sometime in his career must have told Socrates that he was full of shit and if he hated is country so much, why didn't he go live in Sparta or Crete and see if they would let him stand out in the Agora all day criticizing. (Hint: They wouldn't). And Crito offers a sort of hint that, yeah, Socrates probably did have such conversations sometimes.
Was he making a statement of fact as he knew it,
And where was his documentation to back up his claim?
I think Socrates would've been proud of the way I refuted his argument.