Die Welt journalist Deniz Yucel is being freed from jail in Turkey after a year in detention accused of spreading propaganda, German officials say.
His case was an irritant in German-Turkish relations, and on Thursday Chancellor Angela Merkel had pressed for his release.
Mr Yucel, 44, was arrested in Istanbul a year ago and accused of writing propaganda in support of terrorism.
Turkey labels separatist militants in the Kurdish community as "terrorists".
Mr Yucel was arrested after reporting that the Turkish energy minister's email account had been hacked. The journalist has both German and Turkish citizenship.
German Foreign Minister Sigmar Gabriel has confirmed that Mr Yucel will now leave Turkey. He said it was a result of German diplomatic efforts and there had been intensive discussions with Ankara.
"We have a Turkish court decision that Deniz Yucel will be freed," he told reporters.
Nevertheless, Turkey's Anadolu news agency said prosecutors presented an indictment on Friday seeking up to 18 years in jail for the journalist. The charges are "spreading terrorist propaganda" and "stirring enmity".
Mistrust and bad blood
By Mark Lowen, BBC Turkey Correspondent
I watched last year as President Erdogan spoke of Deniz Yucel at a political rally. "They are hiding a terrorist, a spy, in the German embassy," he bellowed, to roars of approval. "Merkel asked me to release him. I told her we have an independent judiciary. He'll pay for being a terrorist."
Today Deniz Yucel was released, after more pressure by the German chancellor. "It seems like some problems in our relations have disappeared," the Turkish prime minister told reporters. Yet Turkey still claims judicial independence.
Was there a deal for his release? We'll never know. But while the biggest impediment to improved Turkish-German ties has been removed, several more remain.
A German human rights activist still faces trial here. Germany has repeatedly criticised the erosion of democracy in Turkey. And Turkey accuses Germany of harbouring terror supporters. The two countries need each other, but mistrust and bad blood run deep.
Read more on the crackdown in Turkey:
On a visit to Germany on Thursday the Turkish Prime Minister, Binali Yildirim, had voiced hope that proceedings in Mr Yucel's case could be speeded up.
Mr Yucel is among more than 100 journalists and writers arrested in Turkey since the failed July 2016 coup attempt against President Recep Tayyip Erdogan.
The Turkish authorities accuse the detainees of links to the alleged coup mastermind - US-based Islamic cleric Fethullah Gulen - or to the Kurdistan Workers' Party (PKK) rebels.
Soon after Friday's announcement about Mr Yucel, a Turkish court sentenced three prominent journalists to life in jail on charges of aiding the Gulen network. They were named as Mehmet Altan - who is also an economics professor - his brother Ahmet, and Nazli Ilicak.
Despite Mr Yucel's imminent release, five others with dual German-Turkish citizenship remain in jail in Turkey on political grounds.
Another two were freed recently - journalist Mesale Tolu and human rights activist Peter Steudtner.
The German government's relations with Turkey - a Nato ally - have been strained because of Mr Erdogan's massive crackdown on opponents since the coup attempt.