Forces from Somalia's Puntland region have stormed a UAE-flagged cargo ship hijacked by pirates in the Gulf of Aden, local officials say.
The men from the semi-autonomous region defeated the pirates after "brief fighting", the mayor of the region's Bosasso port told Reuters news agency.
Seven pirates were arrested in the incident a day after the Al-Khaleej was hijacked, local officials said.
Pirates also seized a Spanish fishing boat in the area at the weekend.
At least three people were wounded in the incident, although the ship's crew were unhurt, local reports said.
The ship was hijacked en-route to Bosasso on Monday.
The incident is the latest in a spate of pirate raids on vessels in Somali coastal waters, some of the most hazardous in the world.
A Spanish naval frigate is now heading for the area where pirates seized a Spanish tuna trawler with 26 crew on board
The captain of the trawler - contacted by Spanish radio - said the crew were "all well". The Somali pirates have demanded a ransom.
The Playa de Bakio - a Basque tuna boat - was attacked about 250 miles (400km) off the coast.
Earlier this month, a luxury French yacht was hijacked with 30 people on board.
A Paris court has charged six Somalis over the incident, detained when French commandos carried out a raid after the hostages were freed.
Last year, more than 25 ships were seized by pirates in Somali coastal waters.
Somalia has not had an effective central government for more than 17 years and is plagued by insecurity.
Puntland, an arid region in the country's north-east, declared itself an autonomous state in August 1998.