Piraeus, which roughly means 'the place over the passage', has been inhabited since the 26th century BC. In prehistoric times, Piraeus was a rocky island consisting of the steep hill of Munichia, modern-day Kastella, and was connected to the mainland by a low-lying stretch of land that was flooded with sea water most of the year, and used as a salt field whenever it dried up. Consequently, it was called the Halipedon, meaning the 'salt field', and its muddy soil made it a tricky passage. Through the centuries, the area was increasingly silted and flooding ceased, thus by early classical times the land passage was made safe. In ancient Greece, Piraeus assumed its importance with its three deep water harbours, the main port of Cantharus and the two smaller of Zea and Munichia, and gradually replaced the older and shallow Phaleron harbour, which fell into disuse.
In the late 6th century BC, the area caught attention due to its advantages. In 511 BC, the hill of Munichia was fortified by Hippias and four years later Piraeus became a deme of Attica by Cleisthenes. In 493 BC, Themistocles initiated the fortification works in Piraeus and later advised the Athenians to take advantage of its natural harbours' strategic potential instead of using the sandy bay of Phaleron. In 483 BC, the mighty Athenian fleet was transferred to Piraeus and was built in its shipyards, distinguishing itself at the battle of Salamis against the Persians in 480 BC. Since then Piraeus was permanently used as the navy base for the developed and powerful fleet of Athens. After the second Persian invasion of Greece, Themistocles fortified the three harbours of Piraeus and created the neosoikoi (ship houses); the Themistoclean Walls were completed in 471 BC, turning Piraeus into a great military and commercial harbour. The city's fortification was farther reinforced later by the construction of the Long Walls under Cimon and Pericles, with which Piraeus was connected to Athens. Meanwhile,