Helicopters had to rescue 479 passengers after the Viking Sky's engines failed and the ship had to anchor in heavy seas.

A maritime official says the engines of a cruise ship failed off Norway's coast during a storm because they didn't have enough lubricating oil.

Lars Alvestad, the head of Norway's Maritime Authority, said Wednesday that low oil levels were the "direct cause" of the engine failure that stranded the Viking Sky on Saturday.

Alvestad says safety systems detected the problem and automatically stopped the engines to prevent a breakdown.

Viking Sky's crew sent a mayday call and anchored in heavy seas to keep the ship from being dashed on rocks in an area known for shipwrecks. Five helicopters lifted 479 passengers off with winches.