Italy's interior minister, Matteo Salvini, identified the ship as the Turkish oil tanker El Hiblu 1. He said the tanker had rescued about 120 people and described what was happening as "the first act of piracy on the high seas with migrants" as alleged hijackers.
The new route put the ship on a route to Italy's Lampedusa island and the island nation of Malta. The governments of both countries vowed to keep it from their territorial waters in the Mediterranean.
"Poor castaways, who hijack a merchant ship that saved them because they want to decide the route of the cruise," Salvini, who heads the anti-migrant League party, was quoted as saying by the ANSA news agency.
There was no immediate word on the condition of El Hiblu 1's crew. Other information about the reported hijacking was unavailable or difficult to confirm while the vessel remained at sea. Italian media reports said the crew planned to take the group it rescued and was headed that way when migrants seized control of the ship six miles from the Libyan coast.
A private group that operates a rescue ship and monitors how governments treat migrants, Mediterranea, urged compassion for the group on the hijacked vessel and said it hoped European countries would act "in the name of fundamental rights, remembering that we are dealing with human beings fleeing hell."
The Armed Forces of Malta said military personnel were standing by and the tanker still was in Libyan territorial waters as of early Wednesday night. A Maltese military official told Maltese media the ship was carrying 108 migrants. The official was not authorized to speak to reporters and requested anonymity.
The official also said Malta would not allow the hijacked tanker to enter the country's waters. Italy's Salvini said weather conditions were not good and it was unclear if the tanker would end up approaching Malta or Lampedusa island. But he had a message for the pirates: "Forget about Italy."
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 travelers frequently drowned and leading arrival spots such as Italy and Greece struggled to house large numbers of asylum-seekers.
Along with the dangerous sea journey itself, those who attempt to cross the Mediterranean risk being stopped by Libya's coast guard and held in Libyan detention centers that human rights groups have described as bleak places where migrants allegedly suffer routine abuse.
EU members "alert the Libyan coast guard 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," Matteo de Bellis, an international migration researcher for Amnesty International, said.
European Union member countries, responding to domestic opposition to welcoming immigrants, have decided to significantly downscale an EU operation in the Mediterranean, withdrawing their ships and continuing the mission with air surveillance only.
EU officials on Wednesday lamented the move. "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," de Bellis said.
Gera contributed from Rome.