A journalist held in a Turkish prison for a year without charge has been released pending a trial.
Deniz Yucel was detained last February on suspicion of spreading propaganda in support of a terrorist organisation and inciting violence.
Mr Yucel, who has both German and Turkish citizenship, denies the accusations.
The court in Istanbul had accepted an indictment seeking up to 18 years in jail for Mr Yucel but had also opted to free him ahead of a trial.
Germany’s foreign minister later told reporters that 44-year-old Mr Yucel was on his way to an Istanbul airport and could “freely leave Turkey.”
Sigmar Gabriel said the court appeared to have set no conditions on his release, and insisted it did not come from any deal between Berlin and Ankara.
At another court in the same building, six other journalists and media employees accused of involvement in Turkey’s 2016 failed coup attempt were sentenced to life in prison without parole.
Prominent journalists Ahmet Altan, Mehmet Altan and Nazli Ilicak and three other media employees were convicted of crimes against the state.
The high-profile case of German newspaper Die Welt journalist Mr Yucel has put a significant strain on relations between the two countries.
Chancellor Angela Merkel said previously his and other Germans’ detention in Turkey “clouded” diplomatic ties and marked a continuing “burden”.
She cautiously welcomed news of Mr Yucel’s release, saying during a news conference in Berlin: “I’m pleased just as many, many others that he was able to leave jail today.
“We know that there are also other cases of people, maybe not as prominent, who remain in custody, and also for them we hope that there will be fast and constitutional judicial proceedings.”
Mr Yucel was arrested after reporting that the Turkish energy minister’s email account had been hacked.
It came following a Government crackdown after it quashed a military coup. More than 55,000 people have been arrested in the clampdown.
Mr Yucel has been held since in Silivri prison on the outskirts of Istanbul.
In December, a court in the same city released German journalist Mesale Tolu.
She was held for over half a year on charges of membership of the Marxist-Leninist Communist Party (MLKP), which is banned in Turkey as a terror organisation.