ISTANBUL (Reuters) - A prosecutor's investigation of Turkey's top spy has exposed a deep rift between police and the intelligence agency which could scupper efforts to end a Kurdish separatist insurgency and damage the government's democratization efforts.
The crisis, driven by police concern about the activities of National Intelligence Agency (MIT) spies uncovered by police operations against Kurdish militants, has also fed speculation, denied by both sides, of a row between the government and an influential Islamic movement.
The conflict surfaced last week when prosecutors sought to question MIT head Hakan Fidan, who is close to Prime Minister Tayyip Erdogan, over MIT's infiltration of an organization linked to the militant Kurdistan Workers Party (PKK).
Prosecutors are also believed to want to discuss government-sanctioned talks which the MIT leadership held secretly with the PKK in Oslo in 2010, amid concerns that the agents offered too many concessions to the militants.
The government has countered with a legal reform requiring the prime minister's permission before MIT officials can be questioned. Parliament approved the bill overnight but it must still be ratified by the president.
The prosecutor who ordered the questioning has been removed from the case and is being investigated by judicial authorities.
The ruling AK Party's law led to a fierce response from the opposition, concerned it will strengthen Erdogan's grip on power, and vowed to challenge it in the constitutional court.
There are also signs of unease in the movement led by Fethullah Gulen, a Muslim theologian living in self-imposed exile in the United States, who retains strong influence in some quarters of the AK.
"The hasty approach to prepare amendments to the law that will require the prime minister's permission to investigate top intelligence officials would sabotage the democratization process," said Huseyin Gulerce from Zaman newspaper, regarded as close to Gulen.
The Gulen movement, thought to be influential in the police, has been a strong supporter of investigations into alleged plots to overthrow Erdogan's government. Gulerce said the cases paved the way for civilian supremacy in politics after decades of military dominance, but that this battle was not yet over.
If prosecutors are stopped from investigating MIT, it could weaken their ability to pursue these other cases.
"The power of the century-old system of military tutelage has neither come to an end nor does it suffer from any serious weaknesses. They still have lots of plans and traps to undermine civilian democracy," Gulerce added.
Beyond the parliamentary moves, Erdogan could act against those in the judiciary and police he regards as challenging him.
The controversy over the intelligence agency comes at an awkward time, with NATO-member Turkey trying to defuse the West's brewing crisis over neighboring Iran's nuclear work, while also scrambling to stop Syria's uprising from exploding into a sectarian conflict that could destabilize the region.
MIT head Fidan is an expert on Iran, and also acted as Erdogan's emissary to Damascus last year for crisis talks with Syrian President Bashar al-Assad. He was also present at least one of the meetings with the PKK in Oslo.
Erdogan knew who his enemies were when he set out to tame the all-powerful army and see off challenges from a hostile judiciary during his first 10 years in power. They belonged to a conservative, secular elite which mistrusted the Islamist pedigree of Erdogan and the AK Party.
This time, tensions within the security apparatus appear to stem from rivalries among factions sympathetic to Erdogan.
"This incident has harmed MIT, it has harmed the prime minister and the AK Party, the police, prosecutors and even Fethullah Gulen's circles who are presented like a party in this debate," said political commentator Avni Ozgurel.
Erdogan, who has Islamist roots but whose AK party includes center-right and even strongly nationalist elements, is easily the country's most powerful politician, and there is speculation that he aims to become president in 2014, before his third and final term as premier ends in 2015.
Still recovering from intestinal surgery, Erdogan has yet to comment on the dispute, but a close adviser has described the crisis as a "game" and warned against giving Turkey's enemies an opportunity to undermine its influence in the region.
"It is of vital importance for the fight against terrorism that the military, police and intelligence services act together in harmony," Erdogan's close adviser Yalcin Akdogan wrote under the assumed name he uses in the pro-government Yeni Safak daily.
DAMAGE ALL ROUND
"Harming the AK Party government today means harming Turkey and everybody within it," he warned in a column which dismissed the idea of a clash between the AKP and Gulen's movement.
Prosecutors want to investigate allegations that MIT agents had effectively aided Kurdish militants in the course of infiltrating an organization believed to be a PKK front and that they undermined police operations against the group.
Police have detained hundreds of people in a bid to break up the Union of Kurdistan Communities (KCK), which the PKK is alleged to have established with the aim of creating its own political system in the mainly Kurdish southeast of Turkey.
Media reports say MIT complains in turn that the police have sabotaged agency infiltration of the organization, exposing its operatives and putting them at potentially fatal risk.
Ozgurel said he believed the state had been planning a major initiative in the spring to resume PKK talks aimed at inducing the militants to put down their weapons.
The Kurdish conflict is a major burden on Turkey, both in economic terms and the mounting death toll, and solving the problem would be a major coup for Erdogan.
But fears about public perceptions of the PKK talks and the spy agency's links to the KCK were likely to undermine chances for a resumption of negotiations with the militants.
"This will scare politicians as it reduces their capacity to take risks," Ozgurel said. "Turkey will lose time and energy because of this because it is impossible to continue for now."
MIT had already been dragged into the spotlight in January when it denied allegations implicating it in a botched air strike near the Iraqi border in December that killed 35 villagers mistaken for militants. Media reports said MIT provided the intelligence for the attack.
Some have interpreted the targeting of MIT as a warning from nationalists to Erdogan against seeking any negotiated settlement with the PKK, having been alarmed by what the PKK had been offered during the abortive Oslo talks.
Talks between the state and PKK were halted after Erdogan's AK Party won a third term in office in June with around 50 percent of the votes. The PKK has returned to fighting using northern Iraq as a refuge for operations in southeastern Turkey.
But there is some hope. In the long term, media revelations of detailed negotiations between the state and the PKK could help clear the way for a peace deal by preparing public opinion and breaking taboos over addressing the militants' demands.
"Starting with relaxing of imprisoned PKK leader Abdullah Ocalan's situation and the freeing of members of the KCK, to the forms of self-governance for the Kurds, such a consensus has been reached on all significant points making it crystal clear how the state views a possible solution," said Hurriyet Daily News commentator Mehmet Ali Birand.
(Editing by Alistair Lyon)