ISTANBUL (Reuters) - President Tayyip Erdogan was quoted on Sunday as saying that Turkey did not need to join the European Union "at all costs" and could instead become part of a security bloc dominated by China, Russia and Central Asian nations.

NATO member Turkey's prospects of joining the EU look more remote than ever after 11 years of negotiations. European leaders have been critical of its record on democratic freedoms, while Ankara has grown increasingly exasperated by what it sees as Western condescension.

"Turkey must feel at ease. It mustn't say 'for me it's the European Union at all costs'. That's my view," Erdogan was quoted by the Hurriyet newspaper as telling reporters on his plane on the way back from a visit to Pakistan and Uzbekistan.

"Why shouldn't Turkey be in the Shanghai Five? I said this to (Russian President) Mr Putin, to (Kazakh President) Nazarbayev, to those who are in the Shanghai Five now," he said.

"I hope that if there is a positive development there, I think if Turkey were to join the Shanghai Five, it will enable it to act with much greater ease."

China, Russia and four Central Asian nations -- Kazakhstan, Kyrgyzstan, Tajikistan and Uzbekistan -- formed the Shanghai Cooperation Organisation (SCO) in 2001 as a regional security bloc to fight threats posed by radical Islam and drug trafficking from neighboring Afghanistan.

Turkish membership of the SCO, which had initially not included Uzbekistan and been known as the Shanghai Five, would be likely to alarm Western allies and fellow NATO members.

Kazakhstan, Kyrgyzstan and Uzbekistan speak Turkic languages, and Ankara signed up in 2013 as a "dialogue partner" saying it shared "the same destiny" as members of the bloc.

Mongolia, India, Iran, Pakistan and Afghanistan are SCO observers, while Belarus, like Turkey, is a dialogue partner.

Dialogue partners are entitled to take part in ministerial-level and some other meetings of the SCO, but do not have voting rights.

Erdogan last week urged Turks to be patient until the end of the year over relations with Europe and said a referendum could be held on EU membership in 2017.

The EU is treading a fine line in relations with Turkey: it needs Ankara's continued help in curbing a huge flow of migrants, especially from Syria, but is alarmed by Turkey's crackdown on opponents since a failed coup attempt in July.

More than 110,000 people have been sacked or suspended since the abortive putsch, and some 36,000 arrested. Media outlets have also been shut down.

The government says the crackdown is justified by the gravity of the threat to the state from the events of July 15, in which more than 240 people were killed.

(Reporting by Daren Butler; Writing by Nick Tattersall; Editing by Keith Weir)