"The Omani ship held for six months was released last night," said Abdiqadir Muse Yusuf, assistant minister for fisheries in northern Somalia's Puntland region.
"I think a ransom was paid but I do not know the exact amount," he added, but gave no other details.
Piracy is rife off Somalia, which has been mired in anarchy since warlords overthrew a dictator in 1991. Maritime officials say at least 30 ships have been hijacked off the coast of Horn of Africa nation so far this year.
A record four ships were seized in 48 hours last week, meaning pirates are holding hostage four cargo vessels, two tankers and a tug boat, along with about 130 crew members.