More than 200 people rescued at sea off the Libyan coast rose up when told they were being taken back and forced the ship to head for Malta.
Italy’s populist, right-wing Interior Minister, Matteo Salvini, described it as "the first piracy on the high seas with migrants" but rights groups highlighted the "hellish" conditions that many fleeing war, poverty and persecution face in detention centres in Libya.
They urged authorities to take the situation into consideration when handling those who commandeered the Turkish oil tanker El Hiblu 1.
A private group that operates a rescue ship and monitors how governments treat migrants, Mediterranea Saving Humans, urged compassion for the group.
It said it hoped European countries would act "in the name of fundamental rights remembering that we are dealing with human beings fleeing hell".
When it became clear that El Hiblu 1 was headed towards Europe, Mr Salvini, a vocal critic of assisting migrants, said his long-standing policy of barring rescue boats and arrivals from Italian ports would stand. "Forget about Italy," he said.
A special operations team from Malta's armed forces retook the tanker on Thursday and escorted it into Grand Harbour. There, police began to process the arrivals.
Those suspected of hijacking the ship were handcuffed and led away by police to a van.
The incident came the same day that European member states voted to stop rescue ships in the Mediterranean that have saved thousands of lives.
The EU said Operation Sophia had saved almost 49,000 people trying to reach Europe in often unseaworthy boats. It also arrested about 150 traffickers.
But with a rise in anti-immigration sentiment among governments across the continent, the sea operation has been scrapped.
Now, the mission will only be able to spot migrant vessels from the air and direct the Libyan coastguard to their locations.
EU members "alert the Libyan coastguard when refugees and migrants are spotted at sea so they can be taken back to Libya, despite knowing that people there are arbitrarily detained and exposed to widespread torture, rape, killings and exploitation", said Matteo de Bellis, of Amnesty International.
The policy of returning migrants to Libya may breach international law, the UN refugee agency has said.
Discussing the EU decision to end the rescue mission’s sea component, EU spokeswoman Maja Kocijancic said: "Without naval assets, the operation will not be able to effectively implement its mandate."
EU spokeswoman Maja Kocijancic said: "Member states have decided to extend the mandate of Operation Sophia for six months with a temporary suspension of its naval assets while member states continue working on a solution related to disembarkation."
Italy commands Sophia but the anti-migrant government refuses to allow EU ships or the vessels of private aid groups looking out for migrants at risk of drowning or dehydration to disembark in Italian ports.
"This shameful decision has nothing to do with the needs of people who risk their lives at sea, but everything to do with the inability of European governments to agree on a way to share responsibility for them," Mr de Bellis said.
Sources told AFP that the decision split the EU's 28 member states, with several countries wondering whether Sophia – now a naval mission without a navy – should be halted.
Attempts to reform Operation Sophia in the long term have delayed by the broader question of how to reform the EU's Dublin asylum rules, which stipulate that the country of the first arrival must process asylum seekers.
Under Mr Salvini, Rome has insisted it should not have to carry the burden of dealing with migrants rescued at sea.
The stance has seen Mr Salvini gain in popularity ahead of EU elections set for May.
"Rationality went out of the window a long time ago," an EU diplomat said. "This is damage control in the hope that once election season is over we might actually come to our senses."
Over the years, Europe has added new functions to the mission, which also trains the Libyan coastguard and controls the enforcement of a UN arms embargo on Libya, and illegal oil trafficking.
The new tasks were an attempt to make the mission more attractive to the likes of Mr Salvini.
EU co-operation with Libya has been credited with sharply reducing the number of migrants arriving from Mena region from a 2015 peak when Europe faced its worst migration crisis since the Second World War.
Until now, two ships have patrolled the central Mediterranean as part of Operation Sophia: Spain's Rayo and Italy's Luigi Rizzo. They have been supported by aircraft from Spain, Italy, Poland and Luxembourg.
Mass migration to Europe has dropped sharply since 2015, when the continent received one million refugees and migrants from countries in the Middle East, Asia and Africa
The surge created a humanitarian crisis in which desperate travellers frequently drowned and leading arrival spots such as Italy and Greece struggled to house large numbers of asylum-seekers.
In every year since 2015, hundreds and even thousands have died trying to make the crossing.
– Additional reporting by agencies