The gunman fired at least three shots outside the court, eyewitnesses said.
Can Dundar escaped unharmed but a reporter was reportedly injured.
Police say they have arrested the suspected gunman.
Erdem Gul, a former colleague of Can Dundar who is also on trial, said the attacker shouted “traitor” as he fired.
Can Dundar, a former newspaper editor, was briefing reporters outside the courthouse when the incident occurred.
The journalist is standing trial alongside Erdem Gul over a series of reports in Cumhuriyet newspaper that alleged Turkish intelligence operatives were transporting weapons to Syria in early 2014.
Can Dundar and Erdem Gul face life in prison if convicted.
Turkey’s President Recep Tayyip Erdogan has faced international criticism over the decision to prosecute the two journalists.
Can Dundar and Erdem Gul are among a number of journalists and human rights activists who have been detained or prosecuted in Turkey in recent months.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…