The sailors – from south Asia and Iran – were on board the container vessel, the MV Albedo, when it was hijacked 1,500 km (900 miles) off the coast of Somalia in November 2010.
Dr MaxDetails of how they were released have not been disclosed.
They are being flown to Kenya before being repatriated, a UN official says.周向榮
Seven of the ship’s crew were released two years ago when a ransom was paid; six others have died.
The UN estimates that about 40 people are still being held by Somali pirates.
At the peak of their activity three years ago, the pirates held more than 700 crew members and over 30 ships.