Somali pirates who took control of an oil tanker on Monday (13 March) have reportedly released the ship and its crew without ransom, officials said.

The release came several hours after a gunfight on Thursday between naval forces and the pirates, followed by negotiations between the marines and the pirates.

The director general of maritime police force for Somalia's semi autonomous region of Puntland, Abdirahman Mohamud Hassan said: "There has been discussion going on after the gunfight of this afternoon ... We pulled our forces back and so the pirates went away."

The tanker was captured when it was making its way from Djibouti to Mogadishu with eight Sri Lankan crew members.

A pirate said they chose to release the ship without any ransom payment, Reuters reported.

"After we came to know that the Somali traders hired the oil tanker, we released it without a ransom," a pirate named Abdullahi was quoted by Reuters as saying. Pirates are reportedly hesitant about annoying powerful businessmen in Somalia.

According to the BBC, four people were injured in the exchange of fire on Thursday. Officials in Puntland sent local forces to assist in rescue efforts of the hostages on board the vessel.

The ship, owned by the United Arab Emirates, was carrying oil. The release will be viewed as a success for the government of Puntland and its counter-piracy force.

It is the first attempt by pirates to hijack a ship off Somalia's coast since 2012. According to International Maritime Bureau statistics, at the peak of piracy in 2011, the pirates waged at least 237 attacks off the coast of Somalia and held hundreds as hostages.

After naval forces stepped up patrols and put safety measures in place, the number of attacks has reportedly decreased.

Somali pirates
Prisoners stand behind bars, at the prison in Garowe, Puntland state, which facilitates the rehabilitation of convicted Somali pirates and suspected Al-Shabaab jihadists in northeastern Somalia Mohamed Abdiwhab/AFP