Firefighters put out a blaze on a cargo ship loaded with military jet fuel early on Sunday, 13 hours after it broke out during stormy weather in the North Sea off Norway.
Thirty-two people were trapped on the vessel when 7,000 litres of fuel belonging to Norway's armed forces caught alight on Saturday night.
Heavy weather forced rescuers to call off helicopters trying to lift the crew and military personnel off the Britannia Seaways, operated by Copenhagen-listed DFSD.
The ship then made it to shore under its own power, about 80 km (50 miles) north of its original destination, the Norwegian city of Bergen, where fire crews put out the blaze on Sunday morning, said officials.
No one on board was injured and the vessel was due to resume its journey later in the day, they added.
"The ship is about to get pilot on board and will set sail for Bergen, where authorities will examine it," the company said.
The vessel was also carrying military vehicles and other equipment.