Kurdish militia groups backed by America and Britain are secretly releasing Isis prisoners on the condition that they carry out attacks in Turkey, a senior figure in President Recep Tayyep Erdogan’s party has claimed.

Some of these jihadists, maintained Mehdi Aker, the deputy chief of the ruling AKP party in Turkey, were targeting his country, but others had smuggled themselves across the Syrian border in order to get back to their homelands in Europe and the Middle-East.

Turkish security forces have carried out a series of raids on suspected Isis cells in the last few weeks and around 10,000 alleged terrorists are being held in the country at present, said Mr Aker.

Four thousand of the prisoners, comprised of 146 different nationalities, had fought for Isis or other extremist Sunni jihadist groups. The others incarcerated are accused of being involved with the PKK, the group which has been battling the Turkish state for over three decades for Kurdish autonomy, and supporters of Fethullah Gulen, the exiled cleric blamed by Ankara for the attempted coup in July 2016. The Turkish military is currently engaged in an offensive against the Kurdish YPG group in the Syrian town of Afrin.

A number of Britons were among those imprisoned, said Mr Aker, head of AKP’s foreign policy committee and a long serving MP, adding that there was “good cooperation” at present between Turkish and British intelligence services over the issue with “exchange of information which is proving useful” and “progress being made.”

Among the jailed Britons is Aine Davis, one of a group of four British Muslims, the so-called “Beatles”, who joined Isis and tortured and murdered hostages, including American and British journalists and aid workers, in Syria.

Davis, 33, from west London was arrested in the town of Silivri, 45 miles west of Istanbul, by Turkish police in November 2015 after being smuggled out of Syria and sentenced to seven years in prison last year following conviction for membership of a terror cell. Another of the “Beatles”, Mohammed Emwazi, who became known as “Jihadi John”, was killed in a US drone strike in the same month, the same year. The remaining two, El Shafee Elsheikh and Alexanda Kotey, were captured trying to flee Syria into Turkey earlier this month.

The arrests of Elsheikh and Kotey were carried out by Kurdish led SDF (Syrian Democratic Forces) and the two men have subsequently provided valuable information to their American and British interrogators. But Mr Aker insisted: “We have good information that YPG/PKK have released some Daesh (Isis) prisoners to help them in the fight against Turkey, they have been directing them against Turkey. The MIT (Turkish intelligence service) have traced and picked up some of these people in Turkey, but some are trying to go home to the Middle East, to Europe.”

Turkey, said Mr Aker on a visit to London, had always been ready to confront Isis, while the West, he claimed, has chosen to apply “double standards with terrorism” by backing Kurdish militias and the US has “provided protection” to Fethullah Gulen.

“We carried out the military Operation Euphrates Shield against Daesh and eliminated 3,000 of the terrorists. As I said we have 4,000 jihadists in Prison. We have suffered terrorist attacks in our country. We have carried out this fight not just for us, but because we are facing an international problem, look at the attacks in London, in Berlin, in Paris in the United States,” he said.

“But then we have the US helping YPG saying they are allies against Daesh, and we have YPG helping Daesh, that is real irony. We have given plenty of evidence to the US about Feto (the Gulen organisation) but this guy Gulen is still there under the protection of the US government. We also have double standards with the PKK. It is on the list as a terrorist organisation in the UK, in the EU, in the US. Then why is the PKK allowed to operate openly, propagating, demonstrating in all these countries?”

Kurdish militia and activists refuted the charges of collusion with Isis as “nonsense” and claimed that it was, in fact, Turkey which had backed jihadists. Mahmoud Berkhdan, an officer in the SDF, which includes the YPG, said: “For more than a year before Isis became a household name in the US and Europe, our fighters were dying to keep the group at bay. We defended communities and minorities from the jihadists, prevented them from enslaving more women and stoning more dissidents than they did. And, by removing Isis from the Turkish border, we thwarted the group’s efforts to extend its reach deeper into Europe.