At least 6,000 soldiers and civilians have been arrested in connection with the failed attempt to bring down Turkey’s government.

Sky News reports that the chief military assistant to the president, senior military commanders, rank-and-file soldiers and thousands of judges are among those rounded up in a sweeping crackdown.

It comes as the death toll from the failed coup rose to more than 290 people, according to the Turkish government.

President Recep Erdogan has vowed to “clean all state institutions of the virus” of supporters of Fethullah Gulen, whose Hizmet movement has been blamed for the coup attempt.

“They may have tanks but we have our faith. We will not leave the squares,” he said at a funeral for some of those killed in the coup.

“I said this yesterday, (Saturday) the people’s demand for democracy cannot be swept aside. This is your right.”

Mourners chanted “Fethullah will come and pay” and “we want the death penalty” as he spoke.

A few groups of plotters are still holding out against in Istanbul, according to a senior official speaking to Reuters.

However, he said that the government was back in control of the country and the remaining leaders of the coup were expected to be arrested shortly.

Turkey’s deputy chief of mission in the United Kingdom, Cem Isik, refused to rule out the death penalty being brought back for the plotters in an interview on Sky’s Murnaghan programme.

“This is treason, this is treachery. There will be investigations into how this happened and who did it.

“Everything right now points to the fact that a military group from various ranks … loyal to the terrorists group of Fetullah Gulen.

“They will be tried and they will receive their punishment,” he said.

Pressed on whether those responsible would be executed, he said, “The people are furious, they have had tanks pointed at them, they have had warplanes pointed at them, they have had helicopters pointed at them. Police officers, civilians, they were all killed. Emotions are running high and they have made those calls.

“Now it is up to any Parliament which represents the people, and of course the Turkish parliament is no different, to listen to those calls.”

Erdogan has asked the United States to extradite Gulen, who lives in exile in Pennsylvania.