A German-Turkish journalist who was jailed in Turkey year ago is to be released, the German government says.
Deniz Yucel, a correspondent for Germany's Die Welt newspaper, was accused of spreading propaganda for the Kurdistan Workers Party, or PKK, a Kurdish separatist group that the Turkish government has branded a terrorist organization.
He was also accused of inciting violence in support of Fethullah Gulen, the reclusive Muslim cleric accused by Turkey of hatching a failed military coup attempt in July 2016.
Yucel was detained on February 14 last year and has always denied the accusations. The detention has been a cause of serious friction between Berlin and Ankara.
The conditions of his release are unclear and Yucel remained in prison shortly after the announcement. It is not clear whether he will be free to travel to Germany.
According to the Turkish state media agency Anadolu, the charges against Yucel have not been dropped. Anadolu reported that the court ordered Yucel's release after accepting an indictment from Istanbul's chief prosecutor on Friday. The indictment allegedly calls for Yucel to be given a jail sentence of up to 18 years.
Sigmar Gabriel, Germany's foreign minister, thanked the Turkish government for speeding up the process of Yucel's release. "I am very pleased with this decision by the Turkish judiciary, and I am even more pleased for Deniz Yucel and his family," he said in a statement. "This is a good day for all of us."
Referring to the continued uncertainty regarding Yucel's status, a foreign ministry spokesperson said, "Now we will need to wait and see what will happen in the next few minutes and hours."
The order to release Yucel comes a day after Turkish Prime Minister Binali Yildirim met German Chancellor Angela Merkel in Berlin.
In remarks after the meeting, Yildirim raised the prospect that Yucel could be freed soon but said, "I hope the case will soon come to court."
Friday's announcement coincides with a two-day visit to Turkey by US Secretary of State Rex Tillerson, who is holding meetings with President Recep Tayyip Erdogan and Mevlut Cavusoglu, Turkey's foreign minister.
Yucel's wife, Dilek Mayaturk, moved from Munich to Istanbul last year to be closer to her husband and tweeted regularly about his imprisonment.
As Friday's news broke, she tweeted in Turkish: "At last!!! At last!!! At last!! Deniz is free!"
Ulf Poschardt, editor-in-chief of Die Welt, spoke of the delight among Yucel's colleagues in a televised interview. "This is the most wonderful day in my career as a journalist. There are tears and cries of joy in our newsroom," he said.
Yucel was one of a number of German nationals imprisoned on political charges in Turkey last year as a diplomatic row between the two countries intensified.
Relations have since improved and two high-profile prisoners -- human rights activist Peter Steudtner and journalist Mesale Tolu -- were released late last year, although judicial proceedings against them are still continuing.
Following Yucel's release, five German nationals remain in custody in Turkey, "whom we must assume are held for political allegations," according to the German foreign office.