ROME -- The Italian Coast Guard rescued 970 migrants Wednesday after smugglers put their cargo ship on automatic pilot heading straight for a crash into the Italian coast and abandoned the command.

The Coast Guard officials said the migrants, most believed to be Syrians and including many children and pregnant women, arrived safely in Gallipoli, in Italy's southeastern Puglia region, before dawn Wednesday. More than 100 migrants were treated for hypothermia.

"It was a race against time," said Coast Guard Cmdr. Filippo Marini. "The ship was only a few (nautical) miles away from the coast of Puglia" on Tuesday night when six Coast Guard officials were lowered by helicopter onto the bridge of the Mouldovan-flagged Blue Sky M to try to correct the ship's course.

Marini said the smugglers apparently had left the engine blocked on automatic pilot at a speed of 6 knots (nearly 7 mph) into the coast.

"There would have been death and destruction" if the vessel had crashed into the coast, he added.

Because a storm was churning up the Adriatic Sea, rescuers couldn't board the ship from nearby Coast Guard vessels. But once on board they unblocked the engine and steered the vessel safely into Gallipoli's harbour, Marini said.

The Coast Guard traced the ship's location after a passenger made a satellite phone call seeking help. It was not clear what port the ship had left from.

To avoid capture, smugglers frequently abandon migrants at sea, sometimes overturning the passengers' unseaworthy boats, according to survivors. This year alone, well over 100,000 migrants were rescued at sea by Italy. Hundreds drowned in the attempt.

Asked how the smugglers could flee given the stormy seas, Marini said the migrants were being interviewed to see if the smugglers might be mingled among them.