Pirates told reporters that the MV Thor Nexus and its crew of 27 Thais were set free Monday after three-and-a-half months in captivity.
The 20,000-ton ship was hijacked off the coast Oman December 25 as it traveled from the United Arab Emirates to Bangladesh.
Somali pirates have hijacked dozens of ships over the past few years, and taken in hundreds of millions of dollars in ransom, in spite of international naval patrols off the Horn of Africa.
On Monday, the United Nations Security Council unanimously passed a resolution calling for greater efforts to fight piracy in the region.
The resolution calls for setting up special courts in Somalia to try suspected pirates, and stresses the need to investigate and prosecute all those who plan and profit from pirate attacks.
The measure also recognizes that instability in Somalia is one of the main causes of regional piracy. Somalia has not had a functioning central government in 20 years.
The current administration has been wracked by infighting, and is under threat from insurgents seeking to turn Somalia into a strict Islamic state.