By Ayla Jean Yackley and Dasha Afanasieva

ISTANBUL/ANKARA (Reuters) - Turkey widened a crackdown on suspected supporters of a failed military coup on Sunday, taking the number of people rounded up in the armed forces and judiciary to 6,000, and the government said it was in control of the country and economy.

President Tayyip Erdogan and the government accused the U.S.-based Muslim cleric Fethullah Gulen, a former ally whom Erdogan accuses of trying to create a "parallel structure" within the courts, police, armed forces and media, of orchestrating the coup.

Erdogan's supporters of gathered in front of his Istanbul home to call for the plotters to face the death penalty, which Turkey outlawed in 2004 as part of its efforts to join the European Union.

"We cannot ignore this demand," Erdogan told the chanting crowd. "In democracies, whatever the people say has to happen."

He said a "terror group" led by Gulen had "ruined" the armed forces, that its members were being arrested in all military ranks, and that a purge of this "virus" would continue. Gulen denied any connection with the coup.

The president has called on Turks to stay on the streets until Friday, and late into Sunday night, his supporters thronged squares and streets, honking horns and waving flags.

Pictures on social media showed detained soldiers stripped to the waist, some wearing only their underpants, handcuffed and lying packed together on the floor of a sports hall where they were being held in Ankara.

One video posted on Twitter showed detained generals with bruises and bandages. Akin Ozturk, head of the air force until 2015 and identified by three senior officials as one of the suspected masterminds of the coup plot, was among those held.

The Foreign Ministry raised the death toll to more than 290, including over 100 rebels, and said 1,400 people were hurt.

The violence shocked the nation of almost 80 million, once seen as a model Muslim democracy, where living standards have risen steadily for more than a decade and where the army last used force to stage a successful coup more than 30 years ago.

It also shattered fragile confidence among Turkey's allies about security in the NATO country, which is a leading member of the U.S.-led coalition against Islamic State. Turkey had already been hit by repeated suicide bombings over the past year and is struggling to contain an insurgency by Kurdish separatists.

ARRESTS

With expectations growing of a heavy clampdown on dissent, European politicians warned Erdogan the coup attempt did not give him a blank cheque to disregard the rule of law, and that he risked isolating himself internationally as he strengthens his position at home.

Broadcaster NTV cited Justice Minister Bekir Bozdag as saying more arrests were expected.

By Sunday evening, authorities had rounded up nearly 3,000 suspected military plotters, ranging from top commanders to foot soldiers, and the same number of judges and prosecutors after forces loyal to Erdogan crushed the attempted coup on Saturday.

Among those arrested was General Bekir Ercan Van, commander of the Incirlik air base from which U.S. aircraft launch air strikes on Islamic State militants in Syria and Iraq, an official said. Erdogan's chief military assistant was also detained, the broadcaster CNN Turk said.

Saudi Arabia detained Turkey's military attache to Kuwait at Turkey's request, Saudi-owned Al Arabiya TV said.

Security forces also clashed with remnants of the coup plotters at Istanbul's second airport on Sunday and at an air base in central Turkey, an official said, adding that arrests had been made and the situation was under control.

On Saturday, Labour Minister Suleyman Soylu told the broadcaster Haberturk he believed Washington was behind the coup attempt. U.S. Secretary of State John Kerry described suggestions of a U.S. role as "utterly false", and said on Sunday that Washington had had no advance intelligence of the insurrection.

The Pentagon also announced on Sunday that operations from Turkey by the U.S.-led coalition against Islamic State had resumed after Ankara reopened its air space, which had been closed during the coup attempt.

However, U.S. facilities at the Incirlik base were still operating on internal power sources after Turkey cut the mains power supply. Kerry said the difficulty for U.S. planes using the base may have been a result of Turkish aircraft flown in support of the coup using it to refuel.

'PARALLEL STRUCTURE'

The crackdown intensifies a long-standing push by Erdogan to root out Gulen's influence.

The cleric denied playing any role in the attempted coup, which he called an affront to democracy, and on Sunday told reporters he believed Erdogan had staged the putsch.

Erdogan said Turkey would demand that Western countries return Gulen's supporters living there, and submit an extradition request for Gulen himself to the United States.

Gulen said he would comply with any extradition ruling but was "not really worried" about one.

Kerry said he had no evidence Gulen was behind the plot, and urged Turkish authorities to compile evidence as rapidly as possible for any extradition request.

Even before the coup attempt was over, Erdogan promised a purge of the armed forces. "They will pay a heavy price for this," he said. "This uprising is a gift from God to us because this will be a reason to cleanse our army."

Erdogan's critics say he will also use the purge to eliminating dissenting voices in the judiciary.

Some European politicians expressed unease.

"(The coup attempt) is not a blank cheque for Mr Erdogan. There cannot be purges, the rule of law must work," French Foreign Minister Jean-Marc Ayrault said.

He told France 3 television that European Union ministers would reiterate on Monday when they meet in Brussels that Turkey, which has applied to join the bloc, must conform to Europe's democratic principles.

European Commissioner Guenther Oettinger said Erdogan would move Turkey away from the core values represented by the EU and the NATO defense alliance if he used the coup to further restrict democratic rights.

"He would strengthen his position domestically, but he would isolate himself internationally," Oettinger, an ally of German Chancellor Angela Merkel, told the Welt am Sonntag newspaper.

Some European politicians are also expressing concern about the future of a deal between the EU and Turkey that has helped to slow the numbers of mostly Syrian migrants crossing from Turkey to neighbouring Greece.

STRAINED RELATIONS

Erdogan's Islamist-rooted AK Party has long had strained relations with the military, which has a history of mounting coups to defend secularism, although it has not seized power directly since 1980.

He commands the admiration and loyalty of millions of Turks particularly for raising living standards and restoring order to an economy once beset by regular crises.

But his conservative religious vision for Turkey's future has also alienated many ordinary citizens who accuse him of authoritarianism. Police used heavy force in 2013 to suppress mass protests demanding more freedom.

During the attempted coup, calls rang out from mosques across the country, urging believers to take to the street to defend their country.

Deputy Prime Minister Mehmet Simsek tried to reassure investors before financial markets opened on Monday.

"The macro fundamentals of our country are solid. We are taking all necessary precautions. We are strong with the support of our people and strengthened political stability," he tweeted.

The central bank said it would provide unlimited liquidity to banks.

(Additional reporting by Humeyra Pamuk, Ece Toksabay, Tulay Karadeniz, Nevzat Devranoglu and Gulsen Solaker in Ankara, Orhan Coskun in Istanbul, Michael Nienaber in Berlin, John Irish in Paris, Julia Edwards in Washington and Greg Savoy in Saylorsburg; Writing by Nick Tattersall and David Dolan; Editing by David Stamp and Kevin Liffey)