A South African yachtsman has been rescued from Somali pirates by European naval forces.
Two other South Africans who were also on board the yacht are still being held captive on mainland Somalia, South Africa's foreign ministry has said.
Details are unclear, but it appears the yacht was hijacked off the Kenyan coast and taken to Barawe.
Kidnapping by pirates for ransom is common in Somalia, which has had no effective government for two decades.
At any given time there are up to 30 warships operating in the Gulf of Aden and the Indian Ocean, trying to stop the pirates.
European Union's anti-piracy force, Navfor, said a French warship went to investigate the yacht as it was sailing suspiciously close to the coast.
"Upon approaching, the team came under fire from the yacht and a Mayday call was received, making it clear pirates were on board and the crew of three were under their control," Navfor said in a statement on Monday.
The vessel later ran aground and the pirates took two crew members ashore, but the captain refused to leave.
He was later rescued and has been taken to Nairobi in Kenya.
The identities of the hostages have not been released by South African officials, but reports in the South African media suggest they are a couple who set sail for Madagascar a year ago and were on their way home via East Africa.
Somalia has been without a central government since President Siad Barre was overthrown in 1991 and there has been years of fighting between rival warlords.
Islamist groups now control large parts of the country and a UN-backed interim government holds only small parts of the capital Mogadishu.