American navy Seals have seized a North Korea-flagged tanker that had been loaded with crude oil at a rebel-held port in eastern Libya, the Pentagon said on Monday.

The operation to take control of the Morning Glory took place a week after Libya failed to prevent the tanker from leaving the rebel-controlled eastern port of Es Sider loaded with an estimated $20m (£12m) cargo, in a crisis that has brought the country to the brink of civil war.

"The Morning Glory is carrying a cargo of oil owned by the Libyan government's national oil company," said John Kirby, a Pentagon spokesman. "The ship and its cargo were illicitly obtained from the Libyan port of Es Sider."

There were no casualties in the operation, which took place in international waters off the coast of Cyprus late on Sunday night. The raid was authorised by the US president, Barack Obama, after receiving a request for assistance from Tripoli. The Seals boarded the 21,000-tonne tanker using helicopters and fast boats from a warship, the USS Roosevelt.

The Pentagon said a US navy crew was piloting the tanker towards an unnamed Libyan port where it will be handed to government control.

In Libya, US ambassador Deborah Jones, who described the rebel actions last week as "theft from the Libyan people", tweeted: "Yes we can" in reaction to the operation on Monday. "Glad we were able to respond positively to Libya's request for help in preventing illegal sale of its oil on stateless ship," she wrote.

Meanwhile, two Israelis and a Senegalese national were briefly detained in Cyprus on suspicion of negotiating to buy crude from the tanker, it was reported on Monday.

The three people were detained in the coastal city of Larnaca on Saturday, but a local court declined to issue arrest warrants as authorities in Cyprus had no evidence that the alleged offence was committed within its territorial waters.

Local media said the three flew to Larnaca on a private jet late on Friday, hired a boat from the marina and went out to the tanker to negotiate with the crew. Police monitored their movements and the boat was intercepted once they were back in Cypriot waters. The trio flew to Tel Aviv on Sunday night.

The US raid took place amid growing fears that Libya is headed towards breakup, with rebel forces in the eastern province of Cyrenaica declaring last week their intention to sell oil independently.

Rebel leaders have been blockading eastern oil ports since last summer, calling for autonomy for Cyrenaica and a greater share of Libya's oil wealth.

Last week, a Libyan gunboat failed to prevent the Morning Glory leaving Es Sider with at least 234,000 barrels of crude.

The ship was operated by an Egyptian-based company that was allowed temporarily to use the North Korean flag under a contract with Pyongyang, the North Korean state news agency, KCNA, reported on Wednesday.

Pyongyang had "cancelled and deleted" the ship's North Korean registry, as it violated its law "on the registry of ships and the contract that prohibited it from transporting contraband cargo".

"As such, the ship had nothing to do" with North Korea, which "has no responsibility whatsoever as regards the ship," according to KCNA.

The ship's escape prompted Libya's congress to fire its prime minister, Ali Zeidan, who fled to Germany last week claiming that his life was in danger.

Government militias ordered to take the oil ports by force clashed last week with a Libyan army unit near the coastal town of Sirte, and rebel forces have since taken up positions blocking approaches to the ports.

Washington's action is seen as a signal of US support for Libya's elected authorities, and comes after rebels declared their intention to load oil into a second tanker expected to dock at the blockaded port of Tobruk.

Three years after its Arab spring revolution, which overthrew Muammar Gaddafi, Libya suffers from militia violence and an ailing economy, with the government struggling to maintain control over much of the country.

On Monday morning, a car bomb ripped through a graduation parade at a military academy in Benghazi, capital of Cyrenaica, killing at least 14 people.

The bomb struck as the cadets paraded at the base before their families, pulverising the vehicle and scattering wreckage and body parts across the compound and nearby highway.

"There are body parts everywhere," said one witness. "The explosion happened at rush hour, there were lots of people passing by." Benghazi's joint operations room said city hospitals had received 14 dead and 12 wounded.

There was no immediate claim of responsibility for the bombing and it is unclear whether the attack was connected to the oil dispute, but it came amid daily killings of security officials in the city and periodic battles between the army and radical militias.