Turkish authorities on Saturday released from jail 62 cadets from Istanbul's military academy and 758 soldiers more than two weeks after the July 15 attempted coup.
Many of the students at Kuleli military high school in the city were believed to be teenagers caught up in the failed putsch by a rogue group in the military which tried to oust the current government.
The students walked out of the gates of the prison in Maltepe on the Asian side of Istanbul to an emotional reunion with crying relatives who had been waiting
An Istanbul court ordered the release of the students late on Friday among a total of 758 soldiers released on the recommendation of prosecutors after giving testimony, adding to another 3,500 former suspects already set free.
However, 231 soldiers were remanded in custody in the same hearings.
The case of the students had amplified concerns that many of the thousands of soldiers detained nationwide over complicity in the coup may have only been following orders and had no idea a putsch was in progress.
Turkish officials have insisted that each case is being examined and no individual is going to be unfairly punished.
Turkey's military, the second-largest in NATO, has been hard hit in the wake of the coup, with about 40 percent of all generals and admirals dismissed. On Thursday, 99 colonels were promoted to the rank of general or admiral, following the dishonourable discharge of nearly 1,700 military personnel.
Defence Minister Fikri Işık told broadcaster NTV on Friday that the shake-up was not yet over, adding that military academies would now be a target of "cleansing".
The number of public sector workers removed from their posts since the coup attempt is now more than 66,000, including some 43,000 people in education, Anadolu Agency reported on Friday.
Interior Minister Efkan Ala said more than 18,000 people had been detained over the failed coup, and that 50,000 passports had been cancelled. The labour ministry said it was investigating 1,300 staff over their possible involvement.
Turkish citizens took the streets on the night of July 15 to block the coup attempt following Erdoğan's call to take to the streets.
Turkey's government has repeatedly said the deadly coup attempt, which killed more than 230 people and injured nearly 2,200 others, was organized by U.S.-based preacher Fetullah Gülen's followers and the Fetullah Terrorist Organization (FETO).
Gülen is also accused of a long-running campaign to overthrow the state through the infiltration of Turkish institutions, particularly the military, police, and judiciary, forming what is commonly known as the parallel state.
Turkey declared a state of emergency following the overthrow attempt.