Italy's coastguard said they narrowly averted a "massacre" after a cargo ship was abandoned at sea with more than 900 Syrian refugees on board.
Officers said the Blue Sky M's engines had been locked and its steering set on a course which would have seen it smash ashore in Italy's Puglia region.
Two helicopters were scrambled overnight and six coastguard officers boarded the ship and managed to bring it under control just five miles from the rocky coastline.
"It was a real race against the clock," said coastguard spokesman Filippo Marini.
"Unlocking the engines was a difficult and delicate operation, but they managed to do it."
The migrants on board, including a heavily pregnant woman whose waters broke during the rescue, were taken to the Italian port of Gallipoli.
Greece's coastguard received a distress call on Tuesday afternoon from someone on the Moldovan-registered ship, who said it was being navigated by heavily-armed men.
A navy frigate, a helicopter and two patrol vessels were sent to intercept the boat off the island of Corfu.
But after what appears to have been a cursory check, the vessel was allowed to continue its journey.
Greek port police said at the time that an inspection had revealed "no (mechanical) problems and nothing suspicious on the boat".
Italian officials believe the armed crew then jumped ship, knowing their human cargo would be picked up by navy or merchant ships.
One man suspected of involvement with the traffickers was arrested when the boat arrived in Gallipoli.