Battle of Megara Location . The city of Megara was situated in the country of Megarid , between central Greece and the Peloponnese . Megara , ally of Sparta , consisted of farming villages , with flat plains and foothills . Megara hosted two harbors : Pagae ( modern Alepochori - Corinthian Gulf ) and Nisaia ( Saronic Gulf ) , making it a prime focus of contention . The Athenian Threat . Attica had been under siege by the Peloponnesian army led by Spartan King Archidamus . The land siege kept Athenians stuck in their city . However , with the Peloponnesian withdrawal , Athens began to attack . Starting as early as 431 BC , Megara was under consistent attack from Athens . During the first invasion Athens brought 10 , 000 Athenians and numerous allies . Athens then set up a fort on Salamis ( near Nisaia ) , and created shipping blockades . The blockades delayed import of food and supplies to Megara . Megarians still had control of Pagae , but Megara was effectively isolated from the western food supplies . Unable to produce normal proportions of food , the situation was dire for the Megarians . Megarian Oligarchy . Urged by the Megarian Oligarchy in 429 , the Peloponnesian fleet attacked the Athenian fort at Salamis . Unknown to the Peloponnesians , the attack was revealed to Athens by beacon lights . Athens dispatched a fleet from the Athenian port of Piraeus . The Peloponnesian attack was abandoned due to the Megarian ships being in a state of disrepair . Under the rule of the Pro - Spartan and Pro - Corinthian Oligarchy , Megara lost the port city of Minoa to Athens in 427 . This loss was a contributing factor to further civil unrest . Megarian revolutions against the Oligarchy began shortly after and Megara became a Democratic state . The Megarian Oligarchy were exiled . Many exiles were permitted by Sparta to inhabit the Boeotian town of Plataea for a year . Boeotia separated Megara and Athens with high mountains ranges in the north . The Spartans were then able to prevent interactions between Megarian Democrats and Athenians on Minoa . The exiled Megarians in Plataea , began northern raids in Megarid , and took Pagae . With Oligarch sympathizers still in Megara , the Oligarchs returned to Megara in 427 BC , and Democracy collapsed . The Spartan Role . It is suspected that Athens prevented food supplies in order to gain control of Megara and prevent further invasions of Attica by the Peloponnesians . However , Athens ' capture of Pylos in 425 detained the Peloponnesian army in Messenia , which lessened the importance of Megara to Athenians . Athens had also successfully trapped hundreds of Spartans on Sphacteria . The Spartans removed all military forces from Messina and arranged a truce . Ambassadors were sent to Athens without consulting Spartan allies . Athens had extensive demands , and Sparta requested a private discussion . Spartan allies were uneasy with the scenario . Megara had a distrust of the Spartans since the Revolution . Megarians were concerned that Sparta may turn over Nisaia to the Athenians . Meanwhile , within the walls of Megara , the Democrats planned to aid Athens in capturing the long walls of Nisaia . Athens then discredited the Spartan embassy because of their request for privacy , and the truce failed . The Battle Commences . During the night Athenians and their allies approached Megara from Minoa and the road to Eleusis . The plan worked and the Peloponnesian garrison was effectively isolated from the city . As morning came , Megarian Democrats pretended to be outraged by the captured walls . The Democrats encouraged Megarians to open the city gates and attack the Athenians . The Democrats then decorated themselves with oil to be easily distinguished from other Megarians . At the crucial moment , the plot was uncovered by the Oligarchs , and the gate remained closed . Athens sensed the change of plan and attacked the Nisaia garrison . Spartans were taken as prisoners and the Peloponnesians were allowed to ransom themselves . Spartan Commander Brasidas appeared with an army larger than the Athenians . The two cavalries fought under the walls of Megara . Resolution . The Battle of Megara was fought in 424 BC between Athens and Megara , an ally of Sparta . The Athenians were repelled . The Oligarchs opened the gate to Brasidas and their allies . The Athenians declined to battle with the Peloponnesians . Over time , Brasidas and Athens both left the city . The Peloponnesian armies stayed . References . 1 . Goete , Hans Rupprecht . Athens , Attica and the Megarid . New York : Routledge , 1993 . , / p > 2 . Legon , Ronald P . Megara - The Political History of a Greek City - State . New York : Cornell