* PM Erdogan says outside powers seek to undermine him
* Gul under pressure to calm tensions before local elections
* Erdogan's AK Party expected to triumph at polls
By Humeyra Pamuk
ANKARA, March 19 President Abdullah Gul has dismissed suggestions that outside forces are conspiring against Turkey, openly contradicting Prime Minister Tayyip Erdogan's assertions that a corruption scandal is part of a foreign-backed plot to undermine him.
The graft inquiry swirling around Erdogan's government has grown into the biggest challenge of his 11-year-rule. He has repeatedly cast it as a scheme by political enemies at home and abroad to damage him ahead of March 30 local elections.
"I don't accept allegations about foreign powers and I don't find them right ... I don't believe in these conspiracy theories as if there are some people trying to destroy Turkey," the Hurriyet newspaper quoted Gul as telling reporters during a visit to Denmark.
"Of course Turkey has its long-standing opponents in the world. Certain groups have praised our work for the past 10 years... Now that they are criticising us, why is this an issue? These types of comments are for third world countries," he said.
Turkey's rapid growth into a major emerging market has largely been based on the stability brought by Erdogan's firm rule over the last decade. But the past several months of political uncertainty have unnerved investors, helping send the lira currency down sharply.
Gul co-founded the ruling Islamist-rooted AK Party with Erdogan and has remained a close ally. But he is viewed as a more conciliatory figure than the combative prime minister and their relations have at times appeared strained.
"The political atmosphere we are in is not making any of us happy. It doesn't make me happy. I am both troubled and saddened by the things we are going through," Gul was quoted as saying.
Gul has been under growing pressure from both within and outside Turkey to calm tensions generated by the graft scandal and is seen as a potential successor to Erdogan as prime minister and head of the AK Party, should Erdogan decide to run for the presidency in an August vote.
He and Erdogan had appeared to have closed ranks since the graft scandal erupted in December, with Gul approving controversial laws tightening Internet controls and giving the government greater influence over the judiciary - moves seen by Erdogan's critics as an authoritarian response to the probe.
The long-running investigation became public on Dec. 17 when police detained the sons of three cabinet ministers and businessmen close to Erdogan. The three ministers resigned a week later, while others were removed in a cabinet reshuffle.
Parliament, currently in recess for the local election campaign period, will reconvene for an extraordinary session on Wednesday, demanded by the opposition, to hear prosecutors' files on the allegations against four of the former ministers.
Last week, a Twitter account behind a string of leaks in the scandal posted what it presented as prosecutors' files accusing the former ministers of involvement with an Iranian businessman in a bribery and smuggling racket.
Reuters could not verify the authenticity of the documents and the former ministers have denied any wrongdoing.
Erdogan says his former ally, U.S.-based Islamic cleric Fethullah Gulen, orchestrated the corruption investigation through a "parallel state" of his supporters in the judiciary and police. Gulen denies the allegations.
Erdogan has responded by reassigning thousands of police officers and hundreds of judges and prosecutors, and driving through the legislation approved by Gul tightening controls of the judiciary and Internet.
Members of parliament have immunity from prosecution, but opposition parties are expected to call on Wednesday for the former ministers to face trial. Rival MPs have previously come to blows over the corruption allegations.
The impact of the graft probe on Turkey's electorate remains unclear, according to widely diverging opinion polls prepared in the run-up to the March 30 elections.
Analysts say the AK Party's core support has held up and that it is on course to remain the biggest party, although its predicted share of the vote ranges from 30 to 50 percent.
The latest survey from one pollster, Konsensus, showed the AK Party would narrowly win the mayoral race in Istanbul but cede control of the capital Ankara to the main opposition CHP for the first time since coming to power in 2002.
SONAR, another pollster, forecast the AK Party would keep control of both of Turkey's largest cities but fail to seize control of the western city of Izmir, a stronghold of the CHP. (Additional reporting by Jonny Hogg; Writing by Daren Butler; Editing by Nick Tattersall and Mark Trevelyan)