The Long Walls, and the access to a port that they provided, were by now the only thing protecting Athens from defeat. Realizing that they could not defeat the Athenians on land alone, the Spartans turned their attention to constructing a navy, and throughout the final phase of the war devoted themselves to trying to defeat the Athenians at sea. Their eventual success, Aegospotami, cut the Athenians off from their supply routes and forced them to surrender. One of the most important terms of this surrender was the destruction of the long walls which were dismantled in 404 BC. The peace treaty that was reached in the same year also provided the termination of Athens' naval power. Xenophon tells us that the long walls were torn down with much jubilation and to the song of flute girls.