ANKARA, Turkey (AP) — Turkish authorities have released a French freelance journalist who was detained on charges of aiding a terror group, Turkey’s state-run news agency reported.

Loup Bureau was freed Friday, a day after French Foreign Minister Jean-Yves Le Drian held talks with Turkish President Recep Tayyip Erdogan and other leaders in Ankara.

Anadolu Agency said Bureau was ordered released from detention by a court in the Turkish town of Silopi, on the first hearing of his case. Bureau has been held since July 26, accused of aiding and assisting a terrorist organization for reporting on Kurds living near the Iraq border.

French President Emmanuel Macron said on his official Twitter account that he was “glad” Bureau was being freed. “This is great relief to all of us,” he said.

The media watchdog, Reporters Without Borders, said the 27-year-old journalist would be deported back to France. RSF director Christophe Deloire said the journalist would probably arrive in France on Saturday.

Deloire praised the efforts of French authorities.

“Erdogan clearly had the key, and he ended up by opening the door,” Deloire said, without going into detail about the negotiations for Bureau’s release.