An oil tanker hijacked in the Mediterranean Sea by migrants was escorted to Malta Thursday after armed forces restored control to the captain.

Maltese armed military personnel stood guard on the ship’s deck, and a dozen or so migrants were also visible, as the Turkish oil tanker El Hiblu 1 docked in the city of Senglea.

Several police vans were lined up on shore to take custody of the migrants for investigation, and four migrants were led off the ship in handcuffs.

Authorities in Italy and Malta on Wednesday said that the group had hijacked the vessel after it rescued them in the Mediterranean, and forced the crew to put the Libya-bound vessel on a course north toward Europe.

Italy’s interior minister, Matteo Salvini, said the ship had rescued about 120 people and described what happened as “the first act of piracy on the high seas with migrants” as the alleged hijackers. Malta has put the number of migrants rescued at 108.

Maltese Prime Minister Joseph Muscat said on Twitter that the nation’s armed forces had conducted a “sensitive operation on high seas.”

“We do not shirk responsibility despite our size,” he said, pledging to follow international rules.

The ship had been heading toward Italy’s southernmost island of Lampedusa and the island nation of Malta when Maltese forces intercepted it.

Maltese armed forces established communications with the captain while the ship was still 30 nautical miles off shore. The captain said he was not in control of the vessel “and that he and his crew were being forced and threatened by a number of migrants to proceed to Malta,” the armed forces said. No details were given of what force and threats were used.

The special team that restored control to the captain was backed by a patrol vessel, two fast interceptor craft and a helicopter.

The Turkish oil tanker El Hiblu 1, which was hijacked by migrants, harbored in Senglea, Malta, on Thursday. Rene' Rossignaud / AP

There was no immediate word on the condition of El Hiblu 1′s crew.

Humanitarian organizations say that migrants are mistreated and even tortured in Libya, and have protested protocols to return migrants rescued offshore to the lawless northern African nation. Meanwhile, both Italy and Malta have refused to open their ports to humanitarian ships that rescue migrants at sea, which has created numerous standoffs as European governments haggle over which will take them in.

While Italy’s interior minister called the hijacking an act of piracy, the humanitarian group Sea Watch disputed that term, saying the actions “were in self-defense against the deadly consequences forced upon them by Europe’s inhumane border policy.”