Hundreds of people watched the crew of HMS York parade through the city for the final time before the ship is decommissioned.The Royal Navy said the Type 42 destroyer was being sold as "it was at the end of its natural life".
The 5,000-tonne ship is affiliated with the city of York and the parade is part of a weekend of events to mark its departure from service.
Lord Mayor Keith Hyman said it was "a sad day" for the city.
But he said the parade would give people the chance to celebrate the ship.
"We have strong connections with all our forces and the naval connection goes back several hundred years so it's quite a sad day that we're handing it back," said Mr Hyman.
'Good relationship' Ex-Wren Peggy Cammidge, from the Royal Naval Association, said: "It's devastating because it's our ship.
"The ship has had a very good relationship with York, each time it comes to Hull or Portsmouth we always get on a train or a coach to go down to see them, so it's very sad."
The parade left York Minster and followed a route through the city centre along Duncombe Place, Blake Street, Davygate, Parliament Street, High Ousegate, Spurriergate and Coney Street.
Members of the public are able to visit the warship in Hull docks this weekend before it leaves on Tuesday.
It is due to be decommissioned later this month.
HMS York entered service in 1985 and was deployed in the 2003 Iraq war.
In 2011 it supported operations during the revolution in Libya.