PARIS — A French photographer has been freed after a month in custody in Turkey, the French president’s office said Friday.

French President Emmanuel Macron’s office said in a statement that Mathias Depardon was released, without elaborating.

The photographer, who was based in Turkey, was on assignment for the National Geographic magazine when he was detained in the mainly-Kurdish province of Batman on May 8. He was being held at a deportation center in the province of Gaziantep.

Turkish officials have not commented directly on the reasons for his detention. Foreign Minister Mevlut Cavusoglu, without naming Depardon, suggested earlier this week that the photographer was detained for allegedly taking photographs of military installations.

Reporters Without Borders and the French government pushed for his release. Macron confronted Turkish President Recep Tayyip Erdogan about the issue when the two leaders met for the first time on the sidelines of a NATO summit last month.

The press advocacy group said on its Twitter account Friday that Depardon was on board a plane headed for Istanbul for Gaziantep. He would return to Paris later on Wednesday.

Reporters Without Borders described his release as an “expulsion” and said it came the day after his mother Daniele Van de Lanotte, RSF chief Christophe Deloire and deputy French consul Christophe Hennings visited Depardon in prison in Gaziantep.

“We are deeply relieved for Mathias Depardon and his loved ones,” Deloire said in a statement thanking the French authorities and others for their help. “His detention was absolutely unjustified, it was one month of a man’s life lost for no reason, not to mention the anguish and uncertainty he suffered.”

RSF says more than 100 Turkish journalists remain in custody for various reasons.