American sailors handed over control of a hijacked commercial tanker to the Libyan government on Saturday, according to the U.S. Embassy in Libya.

The vessel Morning Glory was hijacked earlier this month by three Libyans and filled with oil at the rebel-held port of As-Sidra. Despite an effort by the Libyan government to stop the ship, it pulled out of the port and steamed northeast before being boarded by a team of U.S. Navy SEALs just south of Cyprus last week.

No shots were fired in the boarding, and no one was injured, according to the Pentagon. Three Libyans were detained and two AK-47s were discovered on board.

Sailors from two American ships, the destroyer USS Stout and frigate USS Elrod, escorted the Morning Glory back to Libya over the past week. Saturday’s handover occurred in international waters, according to an embassy statement.

“We are pleased that today’s transfer of the tanker Morning Glory and its cargo and crew went smoothly and as planned,” the statement read. “We have been assured by the Government of Libya that the captain, crew members, and Libyan nationals who were aboard the stateless tanker will be treated humanely in accordance with internationally recognized standards of human rights.”

Libya has been in a state of political chaos since the NATO-backed overthrow three years ago of former dictator Moammar Gadhafi, with armed gangs ruling vast stretches of the desert nation. Oil exports — the pillar of the country’s economy — plummeted after separatist militias in eastern Libya seized key oil-exporting ports and other facilities.

Separatist leaders are now seeking to keep export earnings for themselves by bypassing the impotent central government in Tripoli and selling the eastern region’s oil directly to foreign markets.

Libya’s ineffectual prime minister, Ali Zeidan, was ousted earlier this month when he failed to prevent the Morning Glory from sailing away after it was loaded with the region’s oil. Zeidan, himself accused of corruption, fled to Europe after a parliamentary vote of no confidence.

On March 9, U.S. officials warned that any attempt to sell the stolen oil aboard the Morning Glory would amount to theft from the Libyan National Oil Co. and its joint venture partners, which include U.S. companies in the Waha consortium.

“Any oil sales without authorization from these parties places purchasers at risk of exposure to civil liability, penalties and other possible sanctions in multiple jurisdictions,” State Department spokeswoman Jen Psaki said.

The SEALs, based out of Stuttgart, Germany, are attached to Special Operations Command Europe. They were launched from the destroyer USS Roosevelt, which is attached to the George H.W. Bush Carrier Strike Group, then operating in the eastern Mediterranean.

The Roosevelt provided helicopter support and served in a command-and-control and support role for the other members of the force assigned to the mission, DOD spokesman Rear Adm. John Kirby said in a news release.

The Morning Glory was flagged in North Korea but later deregistered by Pyongyang in connection with the incident, various media have reported.