"We collected the four Thailand men from a remote area," said Mr Omar Sheikh Ali, an official in Somalia's central Galmudug administration.
The four fishermen were among 24 crew members seized in April 2010 when Somali pirates hijacked the Taiwan-flagged fishing vessel FV Prantalay 12.
Another 14 crew from Myanmar were released to the government in the Somalia's northern Puntland region in May 2011 and repatriated by the United Nations Office on Drugs and Crime (UNODC) Hostage Support Programme.
The Thai fishermen’s nearly four-year captivity is one of the longest suffered by any victims of Somali piracy.
Mr Ali said the relieved men were able to contact family members soon after their release on February 25.
"They called their families by phone and cried and cried and cried," he said.
Residents of Galkayo, where the Galmudug administration is based, said a US$150,000 [K150 million] ransom was paid but the information could not be independently verified.
After its capture the FV Prantalay was used as a pirate mother ship to launch attacks far out to sea before it capsized in July 2011 and the crew was taken ashore.
Of the original 24 crew members, six died from sickness at various stages during their captivity.
A further 26 hostages are still being held by Somali pirates.
Piracy off the coast of Somalia reached its height in 2011 when there were 237 incidents attributed to Somali pirates and 28 vessels hijacked.
But a combination of armed onboard guards and international naval patrols have had a big impact and last year there were no successful hijackings, according to the International Maritime Bureau which tracks piracy incidents worldwide.