A cruise ship with nearly 1,400 passengers and crew members lost engine power in heavy winds and more than 25-foot waves near the coast of Norway on Saturday, injuring several people and prompting a painstaking, hourslong evacuation, the authorities said.

The evacuation of the ship, the Viking Sky, began around 2 p.m. local time and stretched through the darkness into the early morning. At 4 a.m. local time, only 280 of the 1,373 people on board had been removed, according to officials with the Joint Rescue Coordination Centre Southern Norway, which was conducting the operation.

When helicopters reached the ship, rescue personnel were lowered to remove passengers by winch one at a time, in wind speeds of more than 45 m.p.h. Filled with 10 to 15 people, the helicopters then returned to land.

Hundreds of other people wearing life jackets, meanwhile, waited on board, in a dramatic scene captured by photos and videos shared on Twitter.