A Turkish man resident in Germany was detained at the Turkish border due to his social media posts allegedly insulting President Recep Tayyip Erdoğan, Deutsche Welle reported on Friday.

A 45-year-old Turkish expatriate in Germany, Kadim D. was going to his hometown of Sivas for vacation. However, when he was entering Turkey by car at Edirne, the police showed him a screenshot of a Facebook post critical of Erdoğan and detained him. The man remained in custody for a day and was released on probation pending trial.

Speaking to the German media, the man said he does not remember posting anything about Erdoğan but said his cell phone was recently stolen.

A spokesperson for the German town of Wuppertal confirmed that Kadim D. is a resident there and said that in the event he cannot return to Germany due to charges in Turkey, he would retain his right to residency. The man reportedly has lived in Germany for over 40 years.

Thousands of people in Turkey are under investigation for insulting President Erdoğan.

This article originally appeared in Turkish Minute on July 29.