Journalist Michael Scott Moore, who has dual US and German citizenship, has been released after nearly three years in captivity in Somalia, officials say.
Ahmed Muse Noor, deputy commissioner of the Mudug region, said Mr Scott had been taken by armed militia to an airport in the town of Galkayo.
German newspaper Der Spiegel reported that the 45-year-old had been taken by plane to the Somali capital, Mogadishu.
He was kidnapped in January 2012 while researching a book on piracy.
The German paper quoted officials who said the journalist, who freelanced for the paper, was in good condition and overjoyed at his release.
Editor-in-chief Wolfgang Buchner said. “We never gave up hope and are now rejoicing with Michael and his family that this nightmare has finally come to an end.”
And a statement from the foreign ministry said a “German citizen who also had US citizenship who was kidnapped in Somalia was set free today”.