Hacı Hamdi Hamit Polat, a Turkish teacher who was released in Turkmenistan after a visit by President Recep Tayyip Erdoğan last week to the central Asian country, thanked the president for helping his release and related his plight in prison. Polat, who was working at a school operated by the Turkish Ministry of Education in Ashgabat, Turkmenistan was detained in May and sentenced to two years in prison for allegedly beating a student. During his talks with President Gurbanguly Berdymuhammadov of Turkmenistan, Erdoğan requested that he pardon Polat. Polat, 49, returned to his hometown in the Turkish province of Malatya and spoke to Anadolu Agency about how he was detained, the prison conditions and his release. "I don't really know how I landed in jail. I was investigated both by Turkmen authorities and by our Ministry of Education. I was vindicated twice, but in a retrial I was convicted for beating the student," he said. Polat said that although he argued with the grade school student, he did not hit him. "The child had no mark of a beating, but they still imprisoned me," he said. Polat was imprisoned in a cell for 38 days and was then transferred to a ward. "My family wasn't able to visit me. They came a few times but I could only see them briefly. They didn't have the means to travel here as well," he said. He served his term in a prison where other Turkish and foreign convicts are incarcerated. "They were difficult times. Drinking unpotable water was difficult and I had to take medication in order not to fall sick," he said. "I don't know how President Erdoğan learned about me, but I was always talking to fellow prisoners that only Erdoğan or the Turkmen president could save me. Thank God our president came to rescue me," he said. "On the day of my release, guards came to the ward and told me I had 10 minutes to get ready. I could not believe it. I was so excited that I hugged the guards. I was taken to the airport and was given new clothes. It was like a dream. President Erdoğan had me travel in the presidential plane to Turkey. He honored me and I thank him very much," he said.