Ex-Air Force head Gen Ibrahim Firtina was among those questioned
Turkey's president has said tensions over an alleged military coup plot will be resolved within the law, after meeting the head of the armed forces.
Abdullah Gul made the statement after a summit with PM Recep Tayyip Erdogan and armed forces chief Gen Ilker Basbug.
Tension between the government and the military has risen following a round of arrests over the alleged plot.
The former heads of the air force and navy and a general have now been freed, having been questioned by prosecutors.
The three - retired air force head Ibrahim Firtina, former navy chief Ozden Ornek and former deputy army chief Ergin Saygun - have not been charged but remain under investigation, prosecutors said.
Gen Saygun was ordered to report to the police regularly.
They were among the most senior of more than 40 officers arrested on Monday.
Some 20 senior military officers have been charged and remanded in custody this week over the so-called "sledgehammer" plot, which reportedly dates back to 2003.
The military has denied any coup plot and has held its own officers' summit to discuss the "serious situation" in the wake of the latest arrests.
Adm Ornek and Gen Firtina appeared in court in Istanbul on Thursday morning for questioning.
Speaking after his release, Gen Firtina said he had been there to "clarify some misunderstandings on issues that were being reported as facts" about the army.
HOW 'COUP PLOTS' EMERGED
June 2007: Cache of explosives discovered; ex-soldiers detained
July 2008: 20 arrested, including two ex-generals and a senior journalist, for "planning political disturbances and trying to organise a coup"
July 2008: Governing AK Party narrowly escapes court ban
October 2008: 86 go on trial charged with "Ergenekon" coup plot
July 2009: 56 in dock as second trial opens
Jan 2010: Taraf newspaper reports 2003 "sledgehammer" plot to provoke coup
Feb 2010: More than 40 officers arrested over "sledgehammer"; 20 charged
After several hours of talks with Gen Basbug on Thursday, Mr Gul sought to reassure the country.
"It was stressed that citizens can be sure that the problems on the agenda will be solved within the framework of the constitution and our laws," a statement from his office said.
The BBC's Jonathan Head in Istanbul says an investigation which has been deeply embarrassing for Turkey's armed forces has now become a little less so.
After four days of questioning, three of the most senior officers serving in the military at the time of the alleged plot have been released.
They had been listed as ring-leaders in the alleged plot in documents printed in a newspaper last month, our correspondent says.
The plot's alleged author, another four-star general is still being questioned, he adds.
Turkey's military has overthrown or forced the resignation of four governments since 1960 - most recently in 1997 - though Gen Basbug has insisted that coups are a thing of the past.
The scale of Monday's operation against the military was unprecedented. Those arrested included two serving admirals, three retired admirals and three retired generals. A number remain in jail.
Reports of the alleged "sledgehammer" plot first surfaced in the liberal Taraf newspaper, which said it had discovered documents detailing plans to bomb two Istanbul mosques and provoke Greece into shooting down a Turkish plane over the Aegean Sea.
The army has said the scenarios were discussed but only as part of a planning exercise at a military seminar.
The alleged plot is similar, and possibly linked, to the reported Ergenekon conspiracy, in which military figures and staunch secularists allegedly planned to foment unrest, leading to a coup.
Scores of people, including military officers, journalists and academics, are on trial in connection with that case.
Analysts say the crackdown on the military would have been unthinkable only a few years ago.
The army has regarded itself as the guardian of a secular Turkish state, but its power has been eroded in recent years, with Turkey enacting reforms designed to prepare it for entry to the European Union.
Many Turks regard the cases as the latest stage in an ongoing power struggle between Turkey's secular nationalist establishment and the governing AK Party.
Critics believe the Ergenekon and sledgehammer investigations are simply attempts to silence the government's political and military opponents.
The AK Party has its roots in political Islam, and is accused by some nationalists of having secret plans to turn staunchly secular Turkey into an Islamic state.
The government rejects those claims, saying its intention is to modernise Turkey and move it closer to EU membership.
"Transformations may sometimes be painful," Economy Minister Ali Babacan said Wednesday.
"We are trying to make Turkey's democracy first class."
Are you in Turkey? What is your reaction to the crackdown on the military? Send us your views on the current crisis using the form below.
The BBC may edit your comments and not all emails will be published. Your comments may be published on any BBC media worldwide.