(CNN) Hundreds of soldiers detained in the fallout of the July 15 coup attempt have been released, Turkish state media reported.

As many as 758 of the 10,012 soldiers held after that failed power grab were freed Saturday on the recommendation of a judge in Istanbul after the soldiers provided testimony on their involvement in the execution of the plot to oust President Recep Tayyip Erdogan.

The judge called the detention of the soldiers, including military students, unnecessary.

In addition, 1,389 military personnel suspected of being allied with the movement of U.S.-based cleric Fethullah Gulen have been expelled from the Turkish armed forces, state-run Anadolu reported on Sunday. Gulen, who is in self-imposed exile, has denied any involvement in the coup.

Wholesale changes

The government Sunday issued decrees to change the military's organizational structure, bringing the armed forces under tighter government control.

Following the attempted takeover the military has been the subject of some of the widest-ranging purges.

JUST WATCHED Fate of soldiers unknown in wake of Turkey coup attempt Replay More Videos ... MUST WATCH Fate of soldiers unknown in wake of Turkey coup attempt 02:38

Under the new decrees, the army, navy and air force will directly be answerable to the Defense Ministry, instead of the military's Chief of General Staff.

In addition, all existing military schools and academies have been shut down and a new National Defense University has been established under the control of the Defense Ministry, Anadolu reports. Military hospitals are now under the remit of the Health Ministry.

Erdogan has also explored the possibility of having the military and National Intelligence Agency directly answerable to the presidency, but conceded that such a change -- which would require altering the constitution -- would need to be explored in cross-party talks.

On Sunday, Erdogan was prevented from addressing an anti-coup rally in the German city of Cologne after Germany's highest court upheld a ban on him speaking to the crowd via video link.

Turkey's EU minister and chief negotiator, Omer Çelik, said on Twitter that the German court's decision went "against democratic values," describing it as an "utter backsliding in freedom of speech and democracy."

It was a "shame," he wrote, to see the EU failing to show "solidarity with a candidate country in the face of a coup threat."

Tens of thousands have turned out at the pro Erdogan demo in Cologne. #cnn A photo posted by Fred Pleitgen (@fpleitgencnn) on Jul 31, 2016 at 7:21am PDT

Turkey is a candidate to join the European Union. There are almost three million Turks in Germany, making them the country's largest ethnic minority.

Swift retribution

Turkey is slowly returning to some degree of normalcy following the attempted coup, which claimed the lives of 246 people and 24 coup plotters. As the government reasserted its authority, it wasted little time in its response.

The country's Prime Minister Binali Yildirim quickly made public addresses denouncing the failed military uprising, while Erdogan vowed to seek revenge for "a clear crime of treason" in an exclusive interview with CNN

The reassertion of power has been swift with mass arrests, detentions and dismissals of suspected coup plotters.

The purge of those alleged to have been involved in the coup has been wide and sweeping. A total of 15,846 people have been detained in connection to the failed coup earlier this month, according to Efkan Ala, the country's interior minister, state broadcaster TRT reported.

The majority of the detentions have been military -- 10,012 people, including 178 generals. In addition to the large number of detentions, TRT reported the interior minister has said 8,113 individuals have been arrested.

Yildirim has also told state-run news agency Anadolu of its intentions to disband Turkey's elite presidential guard unit.

JUST WATCHED Turkish parliament approves state of emergency Replay More Videos ... MUST WATCH Turkish parliament approves state of emergency 01:45

Erdogan drops lawsuits

The president said that he would be dropping several pending lawsuits against people he deemed to have insulted him, he said at a ceremony in Ankara.

"As a milestone, I hereby withdraw all the cases filed for insulting me and forgive all the offenders," he said in a speech marking Martyrs' Memorial Day at the presidential complex in Ankara, commemorating the victims of the failed coup, according to state media outlet Anadolu.

He insisted that his regime had abided by the rule of law during the coup and its aftermath.

"Even during the coup attempt process, we have not made the slightest compromise with the law. Every step we have taken, every decision we have made, every implementation we have launched, it has been under the constitution (and the country's) laws."

Arrest warrants for journalists

Turkish authorities have also issued 47 new arrest warrants for journalists, managers and former staff of the Zaman newspaper, the government said Wednesday. An official from Erdogan's office called the newspaper "the Gulen Movement's flagship media organization."

CNN has reached out to Zaman for comment but they had not responded by time of publishing.

This is the latest crackdown on individuals suspected of having ties to alleged coup plotters including Gulen, whom Erdogan has repeated cited as the mastermind behind the coup attempt on July 15.

JUST WATCHED Turkey cracks down on satire magazine Replay More Videos ... MUST WATCH Turkey cracks down on satire magazine 02:42

"The prosecutors aren't interested in what individual columnists wrote or said. At this point, the reasoning is that prominent employees of Zaman are likely to have intimate knowledge of the Gulen network and as such could benefit the investigation," the official said.

Turkey has closed more than 2,000 institutions they say are linked to Gulen.

Previously, 42 warrants were issued on similar grounds earlier last week. A total of 89 warrants have been issued for journalists in the country to date. Meanwhile, Turkey's broadcasting authority has revoked licenses for 24 radio and television companies believed to have links to Gulen, Anadolu has reported.