A minister kidnapped by pirates in Somalia's semi-autonomous region of Puntland has been freed.
Ports Minister Said Mohamed Rageh was ambushed last Friday and held in the remote pirate stronghold of Jariban.
His release came after negotiations between the pirates and Somali elders. Officials said no ransom was paid.
Analysts say the incident has been embarrassing to the Puntland administration, which has taken a hard line against piracy.
The BBC's Ahmed Mohamed Ali in Garowe said two people were killed in the ambushes on Friday - one person on the pirates' side when security guards opened fire in the initial ambush and a guard in the evening attack.
Puntland's interior ministry said no ransom had been paid for the minister's release.
For the last five years, Puntland - the north-eastern Somali region that declared itself autonomous in 1998 - has been the hub of Somali piracy operations, particularly in the Gulf of Aden.
Last month, a pirate ringleader was sentenced to death for killing the Pakistani skipper of a hijacked cargo ship.
About half of Puntland's prison population is made up of pirates.
Somalia has not had an effective central government for more than 19 years and is plagued by insecurity.