SHELBURNE, N.S. -- Residents of a small Nova Scotia town gathered on the local wharf on Wednesday to eat cake, sip coffee and bid a celebratory farewell to MV Farley Mowat, the one-time flagship of an environmental crusader that had long since become a derelict, polluting eyesore.

The Town of Shelburne invited residents to come to the waterfront for the festive send-off, and watch a tugboat pull the battered, flat-black hulk out of the harbour, where it had languished in decay for almost three years.

The ship was headed for Liverpool, N.S., where it will be scrapped, following a series of frustrating court battles and political pronouncements.

"It's been a real thorn in our side and has cost us a lot of money," said Deputy Mayor Rick Davis, adding that the town does not expect to ever recover the $50,000 in berthage fees it is owed.

"It's been a terrible legal battle."

The 52-metre ship was once part of a small but notorious fleet commanded by Canadian environmental activist Paul Watson, who leads the militant Sea Shepherd Conservation Society.

The vessel was at the centre of a sensational international incident on April 12, 2008, when an RCMP tactical squad stormed the ship and accused its crew of getting too close to the annual seal hunt in the Gulf of St. Lawrence.

Watson said the ensuing arrests amounted to an "act of war."

His group has long used high-profile, vigilante tactics to stop hunters from killing seals, whales and other marine wildlife around the globe.

The Farley Mowat's senior officers were released from a Cape Breton jail in April 2008 after the ship's namesake, Canadian author Farley Mowat, posted their $10,000 bail.

The former Norwegian fisheries research vessel was then sold for $5,000 in 2009. It later showed up in Lunenburg, N.S., in 2010 and then in Shelburne harbour in September 2014.

In 2015, the ship sank in its berth, forcing the coast guard to mount a $500,000 cleanup effort, with more than 2,000 litres of pollutants eventually removed from the hull.

Last month, the coast guard issued a contract to dispose of the Farley Mowat, after years of trying in vain to force the owner, scrap dealer Tracy Dodds, to remove the vessel.

Davis said the ship was in such poor shape that it was only a matter of time before it sank again.

"Every time it rained, it was just like a canoe and we'd have to pay to have it pumped out because we couldn't pump it in the harbour," he said. "It was full of oil and contaminants."

Davis said he was glad the federal government was finally changing the rules around how abandoned vessels are disposed of.

"Before, it was the same as somebody dumped a pile of garbage on your lawn," he said. "It might not be your garbage, but if it's on your lawn, you're responsible for having it removed. That's the way it was for vessels. Now that's going to change."

Last month, the federal government announced $6.85 million in funding over five years to help address the problem posed by abandoned vessels.

The federal government estimates that about 600 boats have been abandoned on Canada's coasts.