Pylos has a long history, having been inhabited since Neolithic times. It was a significant kingdom in Mycenaean Greece, with remains of the so-called "Palace of Nestor" excavated nearby, named after Nestor, the king of Pylos in Homer's Iliad. In Classical times, the site was uninhabited, but became the site of the Battle of Pylos in 425 BC, during the Peloponnesian War. Pylos is scarcely mentioned thereafter until the 13th century, when it became part of the Frankish Principality of Achaea. Increasingly known by its French name of Port-de-Jonc or its Italian name Navarino, in the 1280s the Franks built the Old Navarino castle on the site. Pylos came under the control of the Republic of Venice from 1417 until 1500, when it was conquered by the Ottoman Empire. The Ottomans used Pylos and its bay as a naval base, and built the New Navarino fortress there. The area remained under Ottoman control, with the exception of a brief period of renewed Venetian rule in 1685–1715 and a Russian occupation in 1770–71, until the outbreak of the Greek War of Independence in 1821. Ibrahim Pasha of Egypt recovered it for the Ottomans in 1825, but the defeat of the Turco-Egyptian fleet in the 1827 Battle of Navarino forced Ibrahim to withdraw from the Peloponnese and confirmed Greek independence.
Pylos retained its ancient name down to Byzantine times, but appears after the Frankish conquest in the early 13th century under two names:
In the late 14th or early 15th centuries, when it was held by the Navarrese Company, it was also known as Château Navarres, and called Spanochori (Σπανοχώρι, "village of the Spaniards") by the local Greeks.
Under Ottoman rule (1498–1685, 1715–1821), the Turkish name was Anavarin[o]. After the construction of the new Ottoman fortress (Anavarin kalesi) in 1571/2, it became known as Neokastro (Νεόκαστρο or Νιόκαστρο, "new castle") among the local Greeks, while the old Frankish castle became known as Palaiokastro (Παλαιόκαστρο or Παλιόκαστρο, "old castle").
The soil about Navarino is of a red colour, and is remarkable for the production of an abundance of squills, which are used in medicine. The rocks, which show themselves in every direction through a scanty but rich soil, are limestone, and present a general appearance of unproductiveness round the castle of Navarino; and the absence of trees is ill compensated by the profusion of sage, brooms, cistus, and other shrubs which start from the innumerable cavities of the limestone.
The remains of Navarino, consist of a fort, covering the summit of a hill sloping quickly to the south, but falling in abrupt precipices to the north and east. The town was built on the southern declivity, and was surrounded by a wall, which, allowing for the natural irregularities of the soil, represented a triangle, with the castle at the summit—a form observable in many of the ancient cities of Greece.
The Gialova wetland is a regional blessing of nature. It is one of 10 major lagoons in Greece. and has been classified as one of the important bird areas in Europe. It has also been listed as a 1500-acre archaeological site, lying between Gialova and the bay of Voidokilia. Its alternative name of Vivari is Latin, meaning 'fishponds'. With a depth, at its deepest point, of no more than four meters, it is the southernmost stopover of birds migrating from the Balkans to Africa, giving shelter to no fewer than 225 bird species, among them heron, cormorant, lesser kestrel, Audouin's gull, flamingo, osprey and imperial eagle. It is Gialova, too, which plays host to a vary rare species, nearing extinction throughout Europe, the African chameleon. The observation post of the Greek Ornithological Society allows visitors to find out more and to watch the shallow brackish waters of the lake, they can walk the paths that circumscribe Gialova's different ecosystems.
Pylos has evidence of continuous human presence dating back to the Neolithic Age. In Mycenaean times, it was an important centre, Nestor's kingdom of "sandy Pylos", as recalled by Homer in Book 17 of the Odyssey:
The Mycenaean state of Pylos (1600–1100 BC) covered an area of 2,000 square km and had a minimum population of 50,000 according to Linear B tablets, or even perhaps as large as 80,000–120,000.
Bronze Age Pylos was excavated by Carl Blegen between 1939 and 1952. It is located at modern Ano Englianos, about 9 km north-east of the bay 37°01′41″N 21°41′42″E / 37.028°N 21.695°E / 37.028; 21.695. Blegen called the remains of a large Mycenean palace dating from 1300 BC. found there the "Palace of Nestor", after the Homeric poems. Linear B tablets found by Blegen clearly demonstrate that the site itself was called Pylos (Pulos in Mycenaean Greek; attested in Linear B as 𐀢𐀫, pu-ro) by its Mycenaean inhabitants. This site was abandoned sometime after the 8th century BC and burned to the ground. The ruins of a crude stone fortress on nearby Sphacteria Island, apparently of Mycenaean origin, were used by the Spartans during the Peloponnesian War. (Thucydides iv. 31)
According to the Greek historian Thucydides in his History of the Peloponnesian War, in the 5th century BCE the area was "together with most of the country round, unpopulated" (iv, 3). The ancient city was not located at the modern Pylos, but north of the isle of Sphacteria. In 425 BC the Athenian politician Cleon sent an expedition to Pylos where the Athenians fortified the rocky promontory now known as Koryphasion or Old Pylos at the northern edge of the bay, near the Gialova Lagoon, and after a conflict with Spartan ships in the Battle of Pylos, seized and occupied the bay. A little later the Athenians captured a number of Spartan troops besieged on the adjacent island of Sphacteria (see Battle of Sphacteria). Spartan anxiety over the return of the prisoners, who were taken to Athens as hostages, contributed to their acceptance of the Peace of Nicias in 421 BC.
Little is known of Pylos under Byzantine rule, except for a mention of raids by Cretan Saracens in the area c. 872/3. In the 12th century, the Muslim geographer al-Idrisi mentioned it as the "commodious port" of Irūda in his Nuzhat al-Mushtaq.
In 1204, following the Fourth Crusade, the Peloponnese became the Principality of Achaea, a Crusader state. Pylos fell quickly to the Crusaders according to a brief reference in the Chronicle of the Morea, but it is not until the 1280s that it is mentioned again. According to the French and Greek versions of the Chronicle, Nicholas II of Saint Omer, the lord of Thebes, who in c. 1281 received extensive lands in Messenia in exchange for his wife's possessions of Kalamata and Chlemoutsi, erected a castle at Navarino. According to the Greek version, he intended this as a future fief for his nephew, Nicholas III, although the Aragonese version attributes the construction to Nicholas III himself, a few years later. According to A. Bon, a construction under Nicholas II in the 1280s is more likely, possibly in the period 1287–89 when he served as the viceroy (bailli) of Achaea. Despite Nicholas II's intentions, however, it is unclear whether his nephew did indeed inherit Navarino. If he did, it remained his until his death in 1317, when it and all the Messenian lands of the family reverted to the princely domain, as Nicholas III had no children.
The fortress remained relatively unimportant thereafter, except for the naval battle in 1354 between Venice and Genoa, and an episode in 1364, during the conflict between Mary of Bourbon and the Prince Philip of Taranto, due to Mary's attempt to claim the Principality following the death of her husband, Robert of Taranto. Mary had been given possession of Navarino (along with Kalamata and Mani) by Robert in 1358, and the local castellan, loyal to Mary, briefly imprisoned the new Prince's bailli, Simon del Poggio. Mary retained control of Navarino until her death in 1377. At about this time, Albanians settled in the area, while in 1381/2, Navarrese, Gascon and Italian mercenaries were active there. From the early years of the 15th century, Venice set its eyes on the fortress of Navarino, fearing lest its rivals the Genoese seize it and use it as a base for attacks against the Venetian outposts of Modon and Coron. In the event, the Venetians seized the fortress themselves in 1417 and, after prolonged diplomatic manoeuvring, succeeded in legitimizing their new possession in 1423.
In 1423, Navarino, like the rest of the Peloponnese, suffered its first Ottoman raid, led by Turakhan Bey, which was repeated in 1452. It was also at Navarino that Emperor John VIII Palaiologos embarked in 1437, heading for the Council of Ferrara, and where the last Despot of the Morea, Thomas Palaiologos, embarked with his family in 1460, following the Ottoman conquest of the Despotate of the Morea. After 1460, the fortress, along with the other Venetian outposts and Monemvasia and the Mani Peninsula, were the only Christian-held areas in the peninsula. Venetian control over Navarino survived the First Ottoman–Venetian War (1463–79), but not the Second (1499–1503): following the Venetian defeat in the Battle of Modon in August 1500, the 3,000-strong garrison surrendered, although it was well provisioned for a siege. The Venetians nevertheless recaptured it shortly after, on 3/4 December, but on 20 May 1501, a joint Ottoman land and sea attack under Kemal Reis and Hadım Ali Pasha retook it.
The Ottomans used Navarino (which they called Anavarin or Avarna) as a naval base, either for piratical raids or for major fleet operations in the Ionian and Adriatic seas. In 1572/3, the Ottoman chief admiral (Kapudan Pasha) Uluç Ali Reis built a new fortress at Navarino (Anavarin-i Cedid, "New Navarino", or Neokastro in Greek), to replace the outdated Frankish castle.
The Venetians briefly captured Navarino in the 1650s during the Cretan War.
In 1668, Evliya Çelebi described the city in his Seyahatname:
Anavarin-i Atik is an unequalled castle... the harbor is a safe anchorage... in most streets of Anavarin-i Cedid there are many fountains of running water... The city is embellished with trees and vines so that the sun does not beat into the fine marketplace at all, and all the city notables sit here, playing backgammon, chess, various kinds of draughts, and other board games....
In 1685, during the early stages of the Morean War, the Venetians under Francesco Morosini and Otto Wilhelm Königsmarck invaded the Peloponnese and captured most of it, successfully storming the two fortresses of Navarino in the process. With the peninsula safely in Venetian hands, Navarino became an administrative centre in the new "Kingdom of the Morea", as the Venetian province was called, until 1715, when the Ottomans recovered the Peloponnese. The Venetian census of 1689 gave the population as 1,413, while twenty years later it had risen to 1,797 inhabitants.
After the Ottoman reconquest, Navarino became the centre of a kaza in the Sanjak of the Morea. On 10 April 1770, after a six-day siege, the fortress of New Navarino surrendered to the Russians during the Orlov Revolt. The Ottoman garrison was allowed to depart for Crete, while the Russians repaired the fortress to make it their base. On 1 June, however, the Russians left, and the Ottomans re-entered the fort and burned and partially demolished it. Meanwhile, the population gathered there had escaped to nearby Sphacteria, where Albanian mercenaries of the Ottomans slaughtered most of them.
After the outbreak of the Greek War of Independence in mid-March 1821, Navarino was besieged by the local Greeks on 29 March. The garrison, augmented by the local Muslim population of Kyparissia, held out until the first week of August, when they were forced to capitulate. Despite their promise for safe conduct, the Greeks massacred them all.
The Turks under Ibrahim Pasha of Egypt retook most of the Peloponnese in 1825, including the Pylos area, overcoming the Greek defenders at the battles of Sphacteria (29 April) and Neokastro (11 May). The fortress remained in Ottoman hands until the spring 1828, but in October 1827, the combined Ottoman–Egyptian fleets were defeated in the bay at the Battle of Navarino by the allied navies of the United Kingdom, France and Russia. This event negated Ibrahim's successes, and in autumn 1828 his troops withdrew from the Peloponnese.
The framework of the modern town of Pylos, outside the walls of Neokastro, was built by the troops of General Maison during the subsequent French Morea expedition of 1828–1833.
The western end of Greek National Road 82 begins in downtown Pylos. The highway runs west to east and links Pylos with Kalamata and Sparta. The area enjoys a favorable climate, with especially mild winters.