Al-Monitor spoke with well-informed sources who asked to remain anonymous because of the sensitivity of the matter. Here is their story:

In late July 2015, the two-and-a-half-year Turkish-Kurdish peace process came to an abrupt end. President Recep Tayyip Erdogan and his loyal spy chief Hakan Fidan appear to have set their eyes on the most wanted man in Turkey, 60-year-old clean-shaven guerrilla fighter and author Cemil Bayik . Erdogan remembered well how agents working for Turkish intelligence (MIT) captured the founder of the group, Abdullah Ocalan, in Kenya back in 1999 and brought him back to Turkey blindfolded and shackled.

Since August 2014, when attacks by the Islamic State threatened the very foundations of the Kurdistan Regional Government (KRG), the PKK has gained widespread popularity among Kurds by deploying hundreds of its battle-hardened fighters to defend Iraqi Kurdistan and the Yazidis of Sinjar. A group of former PKK commanders established a formidable army across the border in Syria, where it became a vital partner in the US-led international coalition against the Islamic State (IS).

Iraqi Kurdistan has been a battlefield between the PKK and Turkey since the early 1990s. The PKK has used the rugged mountains of northern Iraq as a hideout since the early 1980s and has clashed several times with various other Kurdish groups including the Patriotic Union of Kurdistan (PUK) and the Kurdistan Democratic Party (KDP) over territory and influence. Staging several cross-border operations since the mid-1990s, Turkey has developed limited special operations capabilities and independent intelligence activities on the ground in the Kurdistan region.

SULAIMANIYAH, Iraq — Information on the reported seizure of two Turkish spies by members of the Kurdistan Workers Party (PKK) near the city of Sulaimaniyah on Aug. 3 is scarce, as Turkey stays silent and the PKK and the Iraqi Kurds refrain from divulging details about what happened.

Sometime after July 2015, when MIT tried to infiltrate Bayik’s inner circle, the PKK enlisted one of Bayik’s bodyguards as bait. MIT took the bait, and for two years the PKK fed accurate information through the guard to MIT agents until a solid base of trust was established between them. The intelligence provided to MIT was so important that two of the top officials on the PKK/Kurdish desk decided to meet with their mole in Sulaimaniyah on at least two occasions.

Around early August, the bodyguard appeared to have fed information to the two MIT officials that Bayik was going to Sulaimaniyah for medical treatment. Killing or abducting Bayik would have been a major intelligence coup for Erdogan.

At the last minute, the guard informed his MIT handlers that he could not meet with them in Sulaimaniyah, where the PUK's sophisticated intelligence apparatus kept a watchful eye. The guard asked them instead to travel to a mountainous resort town halfway between the Qandil Mountains and Sulaimaniyah. With its huge lake, Dukan is popular with Arab tourists from southern Iraq and Kurds looking to escape the scorching heat of the summer. It's an ideal cover for espionage operations.

A group of PKK guerrillas arrived on Aug. 3, apprehended the two intelligence officials and their Kurdish companions at one of the resort sites and drove 43 kilometers (27 miles) to the Qandil Mountains in an operation videotaped by the PKK. The road to Qandil is dotted with PUK checkpoints, but somehow the PKK fighters managed to get the MIT agents through and reach Qandil.

The PKK immediately started interrogating the agents. A former official familiar with the PKK believes that the interrogation and debriefing will take at least three months. Back in Ankara, Erdogan and Fidan — who had not informed the PUK — pleaded with them to intervene. The PUK sent delegations on at least two occasions to persuade the militants to release the MIT agents. The PKK refused.

Turkish Foreign Minister Mevlut Cavusoglu arrived in Erbil and met with a PUK delegation on Aug. 23, but it appears that nothing came out of the meeting. Two sources briefed on the MIT incident told Al-Monitor that Ankara has asked Tehran to intervene on its behalf and an Iranian delegation met with PKK officials, but the Iranians also returned empty handed.

The following morning, on Aug. 24, Turkey took an unprecedented measure and expelled PUK representative Bahroz Galali, who is close to the Kurdish parties from Turkey. Back in 2003, when 11 Turkish special forces were seized by American commandos with the help of the PUK from the city of Sulaimaniyah on July 4, Turkey did not expel Galali, who had served in Ankara since 2000.

When Galali reached Sulaimaniyah airport on Aug. 24, he spoke critically of the PKK and said that the group should not behave as it pleases and should respect the KRG's sovereignty. The PUK spokesperson said the party was not aware of the operation and criticized both Turkey and the PKK.

Senior officials from the PKK, including Bayik, hit back, calling for the expulsion of the Turkish diplomats and warning that PUK or KDP involvement in Turkish ploys would be treason against the Kurdish people.

Some PUK officials have become concerned about the PKK activities in their zone after this incident, but the party is so fractious that it may not be able to take any action. Graffiti depicting the PKK and its founder, Abdullah Ocalan, is common in Sulaimaniyah.

If the PKK goes ahead with publishing the video footage of the operation, Erdogan will have no option but to own up to one of the most humiliating intelligence failures in Turkish history. As for the Iraqi Kurds, who are about to hold a referendum on independence, the unintended consequences of the PKK actions in their territories could become a serious headache.