Turkey's state-run news agency says authorities have detained two people linked to a gunman who attacked a leading journalist outside a courthouse hours before he was sentenced to more than five years in prison for his reports.

The gunman fired two shots Friday at Can Dundar, editor-in-chief of the opposition newspaper Cumhuriyet, before he was subdued and arrested. Dundar escaped unharmed.

Anadolu Agency said the gunman's two friends were detained for questioning on Saturday.

Dundar was convicted of revealing state secrets for reports published in Cumhuriyet on alleged government arms smuggling to Syrian rebels. His colleague, the paper's Ankara representative Erdem Gul, was sentenced to five years.

The case has raised concern over press freedom in Turkey.

The journalists remain free until the end of the appeals process.