Earlier Friday, a separate court in Istanbul freed Deniz Yucel, a correspondent for Germany's Die Welt newspaper, according to the German government.
"Finally, a decision has been made to free my client Deniz Yucel", his lawyer Veysal Ok, wrote on Twitter.
"This isn't the case everything else turns on (in German-Turkish relations), but of course it's of great significance", a German foreign ministry spokesman said immediately after the journalist's release was reported.
Official Anadolu Agency reported that the court accepted prosecutors' indictment seeking 18 years in jail for Yücel, and ruled for his release concerning his lengthy detention.
The foreign ministers of Turkey and Germany agreed Friday to work towards improving bilateral relations after a period of tensions between Ankara and Berlin.
"This is a dark day for press freedom and for justice in Turkey and sets a chilling precedent for scores of other journalists facing trials on similar trumped-up terrorism charges", said Gauri van Gulik, Europe director for Amnesty International, of the sentencing. It all depends on the court, but I think there will be development soon, Yildirim said.
Many German newspapers marked Yucels the first year in custody without charge with front page stories this week, when the #FreeDeniz campaign held a major solidarity event in the German capital.
Deniz Yucel is among the over 100 journalists and writers arrested after the failed coup attempt of 2016 against Turkish President Recep Tayyip Erdogan.
Yucel, 44, arrived in Berlin late on Friday.
Berlin had a year ago advised German investors and holidaymakers to avoid Turkey .
German media reports said Gabriel held two secret meetings with Erdogan about the issue this year - one in Rome and another in Istanbul - with former chancellor Gerhard Schroeder, a personal friend of the Turkish leader, present at the Istanbul talks.