And Erdogan is a practiced takfiri.
Here he is in action, in Turkey's oldest English language newspaper, Hurriyet Daily News.
“Terrorist acts by herds of killers such as DEASH, Boko Haram, al-Shabbab, and the Fethullahist Terrorist Organization [FETÖ] have hurt Muslims and also give opportunities to anti-Islamic circles,” Erdoğan said.
“The innocence of Muslims slaughtered by those organizations is overlooked and our religion and the believers of Islam are held responsible for those atrocities,” he added
Notice how he defines out of Islam any group that engages in terrorism. By this ruse, Islam is cleared and anyone engaging in terrorism is by definition not a Muslim. They may say they are, but they're not. See the "no true Scotsman" fallacy. These are "no true Muslims".And in doing so, he certainly fools a lot of people in the west. Many of whom wish to be fooled; for they wish, deeply desire, that Islam is indeed a "Religion of Peace".
But when you educate yourself about Islam -- when you read the Islamic Trinity of the Koran, the Hadith and the Sirah -- you quickly learn that it's not a religion of peace; quite the opposite, at its core it requires the actions of ISIS, Boko Haram, al-Shabab, and the rest of the dozens of terrorist groups acting in the name of Islam. It requires that Muslims fight the infidel, the kaffir, to establish the rule of Allah in the world.
ISIS set it all out in their glossy magazine, Dabiq, in a famous/infamous article in their August 2016 issue: "Why we hate you and why we fight you". Here's a summary in Huffpo. And here is Sam Harris reading from the magazine. And btw, ISIS really is Islamic. Don't believe me? Read Graeme Wood, an expert on Islam and Islamism, here in The Atlantic, in March 2015