Libyan authorities say the navy has seized control of a tanker as it tried to ship oil out of a port under the control of rebels who plan to sell it independently.
The state oil firm NOC said the tanker was being escorted back to a government-controlled port in western Libya on Monday evening.
A spokesman for the rebels earlier denied that the government had taken control of the tanker.
Rebels have seized three ports and partly control a fourth in the country, and the North Korean-flagged tanker had loaded crude worth $30m at rebel-held al-Sidra port despite a government threat to bomb the ship.
Parliament earlier on Monday ordered the formation of a military force made up of regular soldiers and allied armed groups from across Libya to free the ports, which previously handled a total of more than 700,000 barrels of oil per day.
The operation will start within one week, parliament head Nuri Ali Abu Sahmain said in a decree published by spokesman Omar Hmeidan.
"The force will be set up to liberate the ports and end the blockage," Hmeidan told Reuters news agency.
The rebels demand political autonomy for eastern Libya and a share of oil revenues like under King Idris, who preceded Muammar Gaddafi, who was toppled and killed in 2011.