Updated

Fighting in Somalia's capital killed at least 10 people early Sunday in a barrage of heavy weapons fire, according to witnesses and a government official.

The fighting — a common sight in this war-ravaged country — broke out a day after Somali pirates freed a Spanish fishing boat and its 26-member crew after receiving a ransom of $1.2 million, a Somali official said.

"They used all kinds of weapons: machine guns and RPGs (rocket-propelled grenades) and mortars," said Daud Muhidin Salad, a resident who saw several bodies.

The government official, who asked that his name not be used because he is not authorized to speak publicly, said 10 people were killed.

Somalia hasn't had an effective central government since 1991. The country — among the most violent in the world — is struggling to contain a bloody insurgency by extremists looking to topple the U.N.-backed government.

Besides facing deadly violence, Somalia also has a serious problem with piracy.

Spanish officials did not confirm that a ransom was paid before Saturday's release, saying only that there had been negotiations. But Abdi Khalif Ahmed, chairman of Haradhere port in central Somalia, said ransom was paid before the pirates released the ship.

"The ship is free and the pirates disappeared into their villages," Ahmed said late Saturday.

In Spain, Deputy Prime Minister Maria Teresa Fernandez de la Vega said the crew and the trawler Playa de Bakio were sailing back home, accompanied by a Spanish frigate. She would not comment on any ransom.

The 250-foot tuna fishing boat from Spain's Basque region was captured last Sunday in international waters about 200 nautical miles off the coast of Mogadishu. Pirates fired rocket-propelled grenades, taking the crew of 13 Spaniards and 13 Africans hostage.

All are in good health, De la Vega said.

The seizure came days after French judges filed preliminary charges against six Somali pirates accused of holding 30 hostages aboard a French luxury yacht for a week.

The crew of the yacht Le Ponant was freed April 11 off the coast of Somalia. The ship's owners reportedly paid a ransom to get the crew released.

De la Vega said Spain would be taking up the subject of maritime piracy at a European Union meeting Tuesday.