The court also dropped the international arrest warrants for the men.
The judges took two hearings to arrive at their decision, which they announced to a packed courtroom in Istanbul. Those who could not fit inside held a protest outside the courthouse.
The families of the victims marched out of the courtroom while chanting before the decision was read, The Independent reported.
The ruling is the outcome of the reconciliation agreement reached between Israel and Turkey in June 2016.
Turkey accepted $20 million in compensation for the families of those killed, in exchange for granting legal immunity to Israel and Israelis for the attack on the Mavi Marmara.
On 31 May 2010, Israeli commandos stormed the ship as it sailed in international waters, killing nine people and fatally injuring a tenth. The ship was part of an international flotilla to Gaza.
Last summer, the Turkish parliament ratified the agreement, supposedly nullifying any criminal or civil claims against Israel.
But families of the victims still hoped the court would uphold the lawsuit. Lawyers argued that the agreement was not approved by enough parliamentarians to pardon accused criminals.
On Thursday, IHH, the Turkish humanitarian organization that helped organize the flotilla, said on its Facebook page that it still expected “a fair and proper trial free of political pressure.”
Prior to the binational pact, Turkish prosecutors had sought life imprisonment for the Israeli defendants, which included former chief of staff Gabi Ashkenazi, former Navy chief Eliezer Marom, former air force intelligence chief Avishai Levy and former military intelligence chief Amos Yadlin.
The Tel Aviv newspaper Haaretz reported that about a week ago Turkey’s justice ministry told the court that the case had to be closed.
Last week, at the case’s first hearing since the normalization agreement, a Turkish prosecutor asked the court to comply with the agreement and dismiss the case.
CNN Turk reported that prosecutor Huseyin Aslan said that the case had no legal foundation following the agreement, The Independent reported.
Though Israel has reportedly transferred the compensation sum to the Turkish justice ministry, the families have yet to receive any money.
The day before the judges in Istanbul rendered their ruling, the European Network of Councils for the Judiciary suspended the observer status of the Turkish High Council for Judges and Prosecutors in the organization, citing concerns that the Turkish judiciary is no longer sufficiently independent from Turkey’s executive and legislative branches.
The lawsuit was filed by the family of Furkan Doğan, the Turkish-American teenager who was killed during the raid.