Ankara (AFP) - Turkey has freed 1,200 soldiers detained after the failed military coup, a top prosecutor said on Saturday, in its first major release of suspects amid global criticism of the crackdown.

Those released were privates, Ankara's chief prosecutor Harun Kodalak was quoted as saying by Turkish media, adding that the authorities were seeking to swiftly sort out those who had fired on the people from those who did not.

There have been fears that many of the over 7,400 soldiers detained in the wake of the coup were young conscripts who had no idea what was going on.

"We are committed to moving forward with the legal process diligently," said a Turkish official, confirming the prosecutor's comments on the release.

"No innocent person shall be punished. And the courts will make those decisions."