Andrew Mwangura of the Kenya chapter of the Seafarers Assistance Programme confirmed in a statement that a ransom was paid.
"The Spanish fishing boat Playa de Bakio has been released after a ransom of 1.2 million dollars was paid."
The boat was freed on Saturday and headed towards the Seychelles under the escort of a Spanish frigate. It is expected to dock at port Victoria on Tuesday.
The Spanish government sent a frigate, the Mendez Nunez, to the area from the Red Sea, and a surveillance plane to the French military base in neighbouring Djibouti to carry out reconnaissance.
Mwangura said the boat, which was captured on April 20, "suffered heavy damage caused by gun fire and looting during the piracy attack."
In Spain, Maria Teresa Fernandez de la Vega, Spanish deputy prime minister, said the crew and the trawler Playa de Bakio were sailing back home. She would not comment on any ransom.
The 76-metre tuna fishing boat from Spain's Basque region was captured on Sunday while it was fishing in international waters about 300km off the coast of Mogadishu, Somalia.
Pirates fired rocket-propelled grenades, boarded skipper Amadeo Alvarez Gomez's boat and captured the crew of 13 Spaniards and 13 Africans from various countries.
De la Vega said the crew was in good health.
“The 26 crew are in perfect condition and we are communicating this to the boat's owners and the families,” she said.Mogadishu clashes
The development comes as fighting has once again broken out in Mogadishu, the Somali capital.
At least 10 people were killed on Sunday in clashes between Ethiopian-backed troops and anti-government fighters, witnesses said.
Seven people were also wounded in the overnight attack in the south of the capital.
Reports have also emerged that anti-government fighters have retaken the town of Jowhar, around 90km north of Mogadishu, after government forces abandoned it.
They took control of Jowhar earlier this month.
The coastal waters off Somalia, which has not had an effective central government for more than 17 years and is plagued by insecurity, are considered to be among the most dangerous in the world.
More than 25 ships were seized by pirates in Somali coastal waters last year despite US navy patrols, according to the International Maritime Bureau.