The U.S. Navy has a brief window of opportunity to ensure that a warship continues to grace Washington’s waterfront for another generation.

For more than three decades, the destroyer USS Barry has sat pierside at the Washington Navy Yard, berthed in the Anacostia River across the street from the Navy’s main museum.

Uncounted busloads of Washington students, not to mention visitors of every other stripe, have tramped across her steel decks and peered at gun turrets that laid down covering fire for Marines going ashore in Vietnam. In recent years, the opening of Nationals Park and the Anacostia Riverwalk Trail have brought the old warship to a new peak of visibility and accessibility.

But Barry’s days are numbered, and not just because the hull will eventually need repairs too expensive to perform in situ. The planned replacement to the Frederick Douglass Memorial Bridge, which carries South Capitol Street across the river, will have no swing span to permit the passage of tall ships. The Navy must therefore tow the destroyer away before the new bridge is erected next year.

If the city is not to be left bereft of a warship, a replacement must be found equally quickly.

Why bother? Well, the benefits start at neighborhood scale and go up from there.

Certainly, there are more and more reasons to visit the burgeoning district around the Navy Yard, but a warship is a powerful, and unusual, attraction. Moreover, its particular location on D.C.’s “forgotten river” makes it a perfect anchor for the new walkway that starts at the ballpark.

“Ships are kid magnets,” said Jerry Hendrix, a retired Navy captain who stepped down last year as the director of the Naval History and Heritage Command.

Among Hendrix’s duties was attracting visitors to the National Museum of the U.S. Navy, which sits across from Barry. In August 2013, he tried an experiment: he requisitioned Navy reservists to help extend the ship’s visiting hours to match the museum’s. Attendance doubled, he says.

Such efforts are important to the Navy. Enticing visitors onto a warship boosts the public’s awareness of the service, and in particular, helps with recruiting. The service operates only two other comparable ships, both in New England, and this is not the time to abandon such efforts. Naval matters have been somewhat less in the public eye during the wars in Iraq and Afghanistan, yet the fleet remains a pillar of national security and a key guarantor of world trade. It is well that America’s political leaders and residents of the nation’s capital have a haze-gray hull in view to remind them.

So what are the options? Some argue that the Navy should exercise the clause in the contract that would let it reclaim the cruiser Olympia from a riverfront museum in Philadelphia. Built in 1895, Olympia served as Commodore George Dewey’s flagship at the Battle of Manila Bay. Today the ship is deteriorating, and the museum has been unable to find the money for repairs.

But a warship of more recent vintage and in far better shape is about to become available: the USS Samuel B. Roberts, which will be decommissioned in May after 29 years of distinguished service.

Just a bit larger than the destroyer it would replace, the Roberts is a guided missile frigate of the Oliver Hazard Perry class. The Perrys, tough and relatively inexpensive, comprise one of the most numerous ship classes built since World War II. None is currently slated for preservation.

Its name alone makes the “Sammy B” a worthy candidate. In 1942, Coxswain Samuel B. Roberts gave his life to rescue Marines from a Guadalcanal beach; later that year, the Navy named a destroyer escort after him. That ship, DE-413, helped preserve the U.S. victory at Leyte Gulf by fighting off Japanese battleships in a David-and-Goliath melee that the Navy’s official historian called “the most remarkable of the Pacific War.” A second Roberts, DD-823, turned back Soviet ships bearing missile parts to Cuba and later saw combat off Vietnam.

The current Roberts earned its own place in naval lore as an enduring symbol of the Navy’s “don’t give up the ship” ethos. In 1988, while escorting tankers in the Persian Gulf, the frigate struck an Iranian mine that blew a truck-sized hole in the hull. The crew, well-led and drilled to superb readiness, fought fire and flood into the night. Today, the story of the Roberts is taught throughout the Navy as a case study in how to prepare a ship for combat.

Now the ship is being prepared for retirement, and is eventually to be scrapped. The Navy, the D.C. government, and indeed the public should endeavor to save the Roberts once more time, and to ensure that a new generation can visit a warship on the Anacostia waterfront.