By Jonny Hogg and Nick Tattersall

ANKARA/ISTANBUL (Reuters) - Frustrated by Western failure to heed his advice in Syria and Iraq and still smarting over the collapse of the Muslim Brotherhood, Turkey's Prime Minister Ahmet Davutoglu makes no apology for a foreign policy that has left his country isolated.

His dream of a Middle East with political Islam, the Muslim Brotherhood and Turkey at its heart seems to be fading as chaos in Syria and Iraq threatens its borders and diplomatic ties with Egypt, the Arab world's most populous nation, remain broken.

Turkey's bet on Syrian President Bashar al-Assad's rapid demise and its outspoken support for Egypt's ousted Islamist president Mohamed Mursi appear to have been miscalculations, hobbling its ambition to be a regional superpower.

Assad remains in power, with U.S.-led air strikes against Islamic State militants running the risk of unintentionally bolstering him, while Ankara's continued support for the Muslim Brotherhood has deepened a rift with Gulf Arab states.

But Davutoglu, for years the architect of Turkish foreign policy, first as a government adviser and later as foreign minister, has shown no sign of changing course since assuming office as head of government just over a month ago.

If anything, he has dug in, blaming the rise of Islamic State militants partly on the short-sightedness of the international community and rebuffing suggestions that Turkey's failure to police its borders played a major role.

"The earthquake has just hit the Western world and the United States, which is why they are taking precautions now. We have been warning the world for years," he told a meeting of the World Economic Forum in Istanbul this week.

"Turkey and the region pays the price and everybody else preaches what we should do. This is not fair and it is not acceptable," he said of the threat from Islamic State.

Ankara's decision to back the Muslim Brotherhood and other Islamist groups during Arab Spring pro-democracy protests has meanwhile put them at odds with established powers that proved more resilient than Turkish policy makers predicted.

Story continues

Where Davutoglu saw Mursi's election as the beginning of a new era where old Arab nationalist structures would be swept away, countries like Saudi Arabia saw the Muslim Brotherhood as an existential threat and began to suppress their activities.

Even the authorities in Qatar - traditionally aligned with Ankara as backers of the group - bowed to regional pressure this month to stop their support for the Islamists by expelling seven senior Brotherhood figures.

Turkey quickly offered them sanctuary.

"I don't see how, in this environment, Turkey can have any close relations with major powers in the region except Qatar," said Aaron Stein, associate fellow at the Royal United Services Institute in London.

"That paints a picture of a very isolated Turkey with no sign of an imminent course correction. They're doubling down."

"ORIENTALIST APPROACH"

Turkey's reluctance, so far, to take a frontline role in a U.S.-led military coalition against Islamic State has tested its relations with Western allies, who see it as a key partner and the bulwark of NATO's southeastern flank.

Turkey's parliament is set to approve a mandate this week allowing cross-border military action in Iraq and Syria. But Ankara remains hesitant, fearing air strikes alone could end up simply deepening the instability at its door.

It is already struggling to cope with some 1.5 million refugees from Syria's civil war, while stray mortars have repeatedly hit Turkish territory, prompting it to reinforce military positions along the border.

Turkish officials have long expressed frustration over what they see as the West's failure to heed their warnings that Assad's continued grip on power and the sectarian policies of former Iraqi prime minister Nouri al-Maliki were risking regional stability and sowing the seeds of Sunni radicalization.

But they miscalculated the international community's willingness to intervene.

When Turkish President Tayyip Erdogan, then prime minister, visited the White House in May 2013, he was determined to push President Barack Obama for a military intervention which would weaken Assad to the point of forcing him from power.

Officials cited the 11-week NATO bombing of Serbia in 1999 during the Kosovo war as a possible template.

"The United States and Europe supported the winds of change in the Balkans, we were sure they would support the winds of change in the Middle East," Davutoglu said on Monday.

"I'll be very frank, there is an Orientalist approach ... In the outside world they say: 'these Muslims, they really need an authoritarian leader, it doesn't work any other way' ... This is a form of hidden racism," he told the Istanbul conference.

The underpinnings of Davutoglu's policies were largely laid out in his 2001 book "Strategic Depth". Its emphasis on Turkey coming to terms with its past and reviving long-neglected regional relations led some to label it "neo-Ottomanism", a charge Davutoglu himself strongly rejects.

After becoming foreign minister in 2009 his efforts to build bridges intensified in a then-praised "zero problems with the neighbors" policy, but the Arab Spring uprisings and wars in Iraq and Syria left that in tatters and drew criticism that Sunni Muslim Turkey was pursuing a sectarian agenda.

"WORTHY SOLITUDE"

Turkey's support for the Muslim Brotherhood as a popular movement despite the harm it does to regional relations is part of a long game, an "ethical" foreign policy that has become Davutoglu's trademark, according to Saban Kardas, a professor in international relations at Ankara's TOBB University.

"Turkey will be unlikely to change its principled position on the Muslim Brotherhood any time soon. So, the same (tense) dynamics might continue for a while," he said.

Ibrahim Kalin, a top adviser to Erdogan, said last year that if Turkey was indeed standing alone in the Middle East then it was a "worthy solitude", a willingness to stand by its values and principles even if its allies disagreed.

Behlul Ozkan, an assistant political science professor at Istanbul's Marmara University who once studied under Davutoglu, disagrees. He argues the prime minister's strategy, rather than being principled, aims to export Turkey's brand of political Islam and promote Sunni solidarity to extend Turkish influence.

"There is nothing noble about this isolation; instead of defending human rights or individual liberties, Turkey has pursued an expansionist foreign policy for ideological reasons," Ozkan wrote in the July edition of Survival, the journal of the International Institute for Strategic Studies.

Whatever the motivation, it is a strategy Davutoglu appears bent on pursuing.

His oft-quoted assertion four years ago that "not a single leaf stirs in the Middle East without our knowledge", an expression of Turkey's growing influence in the Middle East, may now look like pride before a fall. But he remains unswayed.

"There are countries which have a vision for the region they live in and for the world. They will be the rising stars," Davutoglu told the Istanbul conference on Monday.

"Then there are countries which have the capacity to rule but which do not have the vision. They will be the status quo and, in time, will regress. Turkey is in the first category."

(Writing by Nick Tattersall; editing by Philippa Fletcher)