Though Naupactus was indebted for its historical importance to its harbour at the entrance of the Corinthian gulf, it was probably originally chosen as a site for a city on account of its strong hill, fertile plains, and copious supply of running water. After the Greco-Persian Wars it fell into the power of the Athenians, who settled there the Messenians, who had been compelled to leave their country at the end of the Third Messenian War in 455 BCE, and during the Peloponnesian War it was the headquarters of the Athenians in all their operations in Western Greece, and the scene of the Battle of Naupactus in 429 BCE. After the Battle of Aegospotami the Messenians were expelled from Naupactus, and the Locrians regained possession of the town. Afterwards it passed into the hands of the Achaeans, from whom, however, it was wrested by Epaminondas. Philip II of Macedon gave it to the Aetolians, and hence it is frequently called a town of Aetolia. The Aetolians vigorously defended Naupactus against the Romans for two months in 191 BCE. Ptolemy calls it a town of the Locri Ozolae, to whom it must therefore have been assigned by the Romans after Pliny's time.