BERLIN (Reuters) - German Chancellor Angela Merkel said on Friday she would discuss with Turkish President Tayyip Erdogan the case of a German man who was sentenced by a Turkish court to six years and three months in prison for membership in a terrorist organization.

FILE PHOTO: German Chancellor Angela Merkel speaks during her Christian Democratic Union (CDU) party colleague and Hesse State Prime Minister Volker Bouffier's campaign rally for the upcoming state election Dieburg, Germany, October 23, 2018. REUTERS/Ralph Orlowski

The German foreign ministry earlier on Friday said it was providing consular services to the man, identified in German media as 29-year-old Patrick K., who was also sentenced to almost two years’ prison for entering a sealed military territory. That sentence was suspended.

The reported court decision comes ahead of Merkel’s arrival in Turkey on Saturday for an international summit on Syria hosted by Erdogan.

“Concerning Turkey, I will meet tomorrow in Istanbul with President Erdogan and of course we will talk about this case,” Merkel told a news conference in Prague where she met Czech Prime Minister Andrej Babis.

“We are pleased that we managed to get back several other people to Germany but each case is individual,” she said.

Relations between the NATO partners soured after Germany condemned Turkey’s arrests of some 50,000 people following a failed coup, and the suspension or firing of 150,000 others, including teachers, judges and soldiers.

Ties have improved in recent months, especially after Turkey released German-Turkish journalist Deniz Yucel in February and lifted a travel ban imposed on journalist Mesale Tolu after she was released from prison in December following eight months in detention.

Germany has warned citizens visiting Turkey to be extra cautious about their social media feeds in response to a spate of cases of Germans arrested for online criticism of Erdogan’s government.

Five German nationals are currently detained in Turkey for political reasons, foreign ministry spokesman said on Friday, but he declined to say whether Germany regarded this conviction as political.

German Economy Minister Peter Altmaier, currently on an official trip to Turkey, asked about the sentence on Friday, said, “We will look very closely at this sentence.”

A spokeswoman for the ministry earlier declined to comment on whether the minister would raise the issue during his visit.

The Turkish prosecutor accused K. of being a member of the Syrian Kurdish YPG, considered by Ankara to be a branch of the outlawed Kurdistan Workers Party (PKK), which has waged a three-decade insurgency in Turkey’s largely Kurdish southeast, Huseyin Bilgi, lawyer for Patrick K., told Reuters on Friday.

The lawyer said K. wanted to go to Syria to help the wounded there, but was unable. He said they would appeal the verdict.

K.’s family said he was in Turkey on a hiking holiday, Die Welt reported.