Somali pirates who hijacked an oil tanker have released it without condition, officials say.
The announcement came hours after the pirates and naval forces exchanged gunfire over a boat believed to be carrying supplies to the hijackers.
Pirates seized the tanker, which was en route from Djibouti to the Somali capital, Mogadishu, on Monday. It had eight Sri Lankan crew members on board.
It is the first hijack off Somalia's coast since 2012.
Puntland maritime police director general Abdirahman Mohamud Hassan said: "There has been discussion going on after the gunfight this afternoon... We took our forces back and thus the pirates went away."
A pirate confirmed the release was made without a ransom payment, according to Reuters.
However, former British army officer John Steed, who has spent years negotiating the release of piracy hostages in Somalia, told the AFP news agency they were made an offer they could not refuse.
Mr Hassan earlier said "pirates" on board the tanker had opened fire on Thursday after authorities tried to intercept a boat believed to be carrying essential supplies, such as food.
Four people were wounded in the exchange of fire on Thursday, the BBC has learned.
Puntland authorities deployed local forces in the area in an attempt to assist rescue efforts for the hostages on board the vessel, the district commissioner said.
The United Arab Emirates-owned vessel was carrying oil, he said.
Hijackers demanded ransom
On Wednesday, the European Union (EU) anti-piracy naval force, which helps tackle piracy in the region, said the hijackers demanded a ransom.
Authorities were then still trying to determine whether the gunmen, who did not say the size of the ransom, were organised pirates or fisherman whose equipment was destroyed by illegal fishing vessels.
The EU force earlier made contact with the ship's master, who said his vessel and crew were being held captive anchored off the coast of north-east Somalia. The ship's tracking system was reportedly switched off.
Piracy off Somalia costs declining
Piracy off the coast of Somalia, usually for ransom, has reduced significantly in recent years, in part because of extensive international military patrols and support for local fishing communities.
At the height of the crisis, in 2011, there were 237 attacks and the annual cost of piracy was estimated to be up to $US8 billion.
However, some smaller fishing vessels were recently seized in the area.
In 2015, Somali officials warned piracy could return unless the international community helped create jobs and security ashore, and combat illegal fishing at sea.
Some Somali fishermen turned to piracy after their livelihoods were destroyed by illegal fishing from foreign trawlers, which benefited from the lack of a functioning coastguard in the country after years of conflict.