A Turkish court determined authorities violated the rights of Cumhuriyet editor-in-chief Can Dündar and Ankara bureau chief Erdem Gül during their arrest, releasing the men on Friday.

The court convened to discuss the journalists’ individual petitions and ruled on Thursday in favor of Dundar and Gul, saying that their “rights to personal liberty and security had been violated,” according to a statement on the court’s website. According to Turkish media reports, the judges voted 12 in favor and three against the ruling.

“Their freedom of expression and freedom of press” were also violated, the court added as it ruled that the dossier would be sent to the lower court for “the removal of violation.” This should pave the way for the journalists’ release, private NTV television reported.

“Sorry for keeping you waiting this long,” said Dündar outside of the prison. “You know, the 26th is President [Recep Tayyip] Erdoğan’s birthday. We are happy to celebrate his birthday with this release decision.”

He added, “First of all, we would like to thank our hope watchers for giving us hope from that tiny tent. We witnessed that a tiny tent can bring a giant palace to its knees. We are out but over 30 of our colleagues are inside. I hope this decision will clear the way for them as well.”

Their controversial report did not state whether the Syrian rebels aligned themselves with the Islamic State (ISIS/ISIL) or al-Qaeda-linked groups such as the al-Nusra Front. They only said the “security forces stopped a convoy that appeared to be shipping weapons to Syria in early 2014.” The report claimed the Turkish National Intelligence Organization (MIT) directed the trucks to Syria.

Turkish President Recep Tayyip Erdoğan filed the complaint against Dündar. He also claimed the two men received the news from controversial cleric Fethullah Gulen, “considered an enemy of the state by the Erdoğan government.”

By publishing fabricated footage and information that were leaked to him by the parallel organization, [Dündar] participated in the actions of the organization’s members who searched the trucks and plotted with fabricated evidence to create a perception … that the Republic of Turkey [was] helping terrorist organizations.

In January 2015, authorities raided the offices of Cumhuriyet to prevent editors from publishing a special Turkish-language edition of the French satirical magazine Charlie Hebdo. The police arrived at the same time as the trucks that carried the special four-page insert. They let go when they found none of the inserts contained a Muhammad cartoon.

Erdoğan has claimed Turkey’s press is the freest in the world. Despite this, authorities have invaded numerous press offices.

Last September, police officers raided Turkish magazine Nokta after it published an illustration of Erdoğan taking a selfie next to a soldier’s coffin. The officers also seized remaining copies from the newsroom.

On September 4, police ransacked the offices of opposition paper Bugün after the publication ran a story that claimed Turkey sent weapons to the Islamic State (ISIS/ISIL) in Syria. The paper included pictures that allegedly show the weapon exchange.

Only a few days later, angry supporters of Erdoğan’s Justice and Development Party (AKP) and a member of Parliament attacked the officers of Hürriyet with stones and shouted, “God is great” after the publication tweeted Erdoğan’s remarks about the PKK. The outlet deleted the tweet but face a probe for allegedly insulting the president. Editor-in-chief Sedat Ergin condemned the attacks.