Turkey's president Recep Tayyip Erdogan sought to further tighten his grip over the country yesterday by bringing the armed forces and spy agency under his control.

Mr Erdogan issued a presidential decree that will see the military - long seen as the guardians of the secular republic - yield even more to government power, as Ankara dismissed nearly 1,400 services personnel.

The decree confirmed that a new national military university will be established within the defence ministry, while army schools and academies would be closed down.

In an interview on Saturday, Mr Erdogan said he also wanted to subject the MIT intelligence agency and the chief of general staff's headquarters to presidential authority.

Military hospitals are to come under the control of the health ministry, subject to proposals being approved by parliament, where they will need a two-thirds majority to be passed.

Since the botched coup two weeks ago, the government has dismissed 66,000 public sector workers, detained 1,800 military servicemen and cancelled 50,000 passports, while declaring a three-month state of emergency.

The state has shut 142 media outlets and detained several journalists it accuses of having links to the putsch.

But 758 of the 989 military school conscripts held after the power grab were freed over the weekend on the recommendation of a judge who described their detention as "unnecessary" and deemed them not to be a flight risk.

Suspects can be detained for up to 30 days without charge under the new decree.

It also allows the government to monitor conversations suspects have with their legal representation.

The international community has repeatedly expressed concern at the crackdown.

President Erdogan, in turn, has stepped up his attacks on nations criticising his actions, telling them to "mind your own business".

Turkey and the US are at odds over the extradition of Fethullah Gulen, the US-based Muslim cleric accused by Ankara of masterminding the uprising.

The US is reported to believe there is not enough evidence linking him to the coup plot to grant Turkey's request, but no decision has yet been made.

Melih Gokcek, the mayor of Ankara, said in an interview yesterday that ties between the two were at risk.

"For America to prove it is not behind the coup, there is only one thing to do - deliver [Mr Gulen] to Turkey," Mr Gokcek said.

He claimed the US had given "signals" that it was involved in the coup after a top US general expressed concern that many of Washington's former Turkish military interlocutors were now in jail.

More than 30,000 people rallied in support of Mr Erdogan yesterday across Germany, home to the biggest Turkish diaspora in the world.

Frank-Walter Steinmeier, the German foreign minister, warned demonstrators that there was "no place" for any side to "bring domestic political tensions from Turkey to us in Germany and intimidate people with other political convictions".