A Turkish journalist survived an assassination attempt before being jailed by a judge in a controversial state secrets trial in Istanbul. The court jailed opposition daily Cumhuriyet journalists Erdem Gul for five years and Can Dundar for five years and 10 months for revealing state secrets.

Dundar, the former editor of the newspaper, and Gul, the Ankara bureau chief, were prosecuted over reports alleging the Turkish government had smuggled arms to jihadists in Syria. The trial had been criticised by observers for an attack on free speech amid a Turkish government crackdown on the media.

Dundar's attacker fired several shots and shouted "traitor" before he was subdued by an opposition party legislator and Dundar's wife before he was arrested by plain clothes police officers. The assailant completely missed Dundar, but a reporter was lightly injured in the leg.

The Turkish Dogan news agency identified the attacker as 40-year-old Murat Sahin.

The two men were acquitted on a more serious charge of espionage – which carries a life sentence. The pair are expected to appeal against the sentence.

The newspaper published a news article, and recorded footage of Turkish security forces intercepting a convoy of lorries near the Syrian border in January 2014. Cumhuriyet alleged these vehicles were linked to Turkey's MIT intelligence organisation, but the government said the lorries were carrying weapons to Syria's Turkmen minority, not Islamist rebels fighting Bashar al-Assad's army in Syria.

Can Dundar (R), editor-in-chief of Cumhuriyet, accompanied by his Ankara bureau chief Erdem Gul arrive at the Justice Palace in Istanbul, Turkey May 6, 2016. REUTERS/Osman Orsal

Published in May 2015, the story triggered a political storm in Turkey with President Recep Tayyip Erdogan and the national intelligence agency, MIT, plaintiffs in the case. "I don't know who the attacker is, but I know who encouraged him and made me a target," Dundar said in reference to his belief that the Turkish president and others have called for the journalists to be punished.

Dundar has said that he does not regret reporting the story in a landmark decision for press freedom in Turkey. Erdogan said that the video footage captured by Cumhuriyet was a state secret. "Whoever wrote this story will pay a heavy price for this. I will not let him go unpunished," he stated.

Turkish National Assembly session on parliamentary immunity descends into fistfight IBTimes UK