Pylos has 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. After that, Pylos is scarcely mentioned 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 and the French military intervention of the 1828 Morea expedition forced Ibrahim to withdraw from the Peloponnese and confirmed Greek independence. The current city was built outside the fortress walls by the military engineers of the Morea expedition from 1829 and the name "Pylos" was revived by royal decree in 1833.