A whale that had been spotted swimming in Dublin Bay this week has died.

Passengers and crew on the Irish Ferries vessel Ulysses spotted the corpse of the fin whale floating in the water as the vessel left Dublin Port on Friday.

The whale was regarded as a hazard to shipping so its remains were towed further out to sea by a Dublin Port vessel where it was expected to sink after a few hours.

Originally whale watchers thought it was a minke whale after it was spotted off Sutton on Tuesday, but it turned out to be a fin whale, the second biggest animal in the world after the blue whale.

Though still only a juvenile, the whale was approximately 20m long. The largest of the species can grow to 30m.

Simon Berrow, chief executive of the Irish Whale and Dolphin Group, said he was not surprised the fin whale had died. He said an animal of that size coming so close to the shore is usually a sign of stress or disorientation, which can be fatal.

“Fin whales are usually on the south coast of Ireland. They occur occasionally in the Irish Sea, but it is unnatural behaviour to see them this close to the shore,” he said. “They don’t hug the coast like this and they certainly don’t go into harbours and bays.”

Mr Berrow said the fin whale is a filter feeder and consumes fish such as herring and sprat at an enormous rate. For that reason they are not normally found along the coast, as their food supply is less plentiful there.

However, he said the fin whale that died in Dublin Bay did not seem to be emaciated.