By SUZAN FRASER, Associated Press

ANKARA, Turkey (AP) — In new blow to media freedoms in Turkey, a court on Thursday ordered two prominent opposition journalists jailed pending trial over charges of willingly aiding an armed group and of espionage for revealing state secrets for their reports on alleged arms smuggling to Syria.

The court in Istanbul ruled that Cumhuriyet newspaper's editor-in-chief Can Dundar, and the paper's Ankara representative, Erdem Gul, be taken into custody following more than hours of questioning.

In May, the Cumhuriyet paper published what it said were images of Turkish trucks carrying ammunition to Syrian militants.

The images reportedly date back to January 2014, when local authorities searched Syria-bound trucks, touching off a standoff with Turkish intelligence officials. Cumhuriyet said the images were proof that Turkey was smuggling arms to rebels in Syria.

The government had initially denied the trucks were carrying arms, maintaining that the cargo consisted of humanitarian aid. Some officials later suggested the trucks were carrying arms or ammunition destined to Turkmen kinsmen in Syria. Turkish President Recep Tayyip Erdogan suggested the same recently saying: "what difference would it make if they were carrying arms?"

Dundar and Gul's detention come amid deepening concerns over deteriorating conditions for journalists in Turkey, including a spike in prosecutions and violence.

In August, Turkey detained three journalists reporting for Vice News in the country's restive Kurdish southeast. One of them, Mohammed Rasool, is still in custody. Rasool, an Iraqi citizen, had worked as a news assistant for The Associated Press and other organizations.

The office of the Turkish daily Hurriyet was vandalized following criticism of the newspaper by Erdogan. After the attacks, Hurriyet columnist Ahmet Hakan was chased and beaten. Recently, a business that owns several media outlets was placed under management.

Dundar and Gul's supporters chanted: "Free press cannot be silenced" inside the courtroom after court announced its decision, Dogan news agency video footage showed. Main opposition party leader Kemal Kilicdaroglu said the decision marked a "black day" for democracy and freedoms.

Gul told reporters that he and Dundar are accused of helping the moderate Islamic movement led by U.S.-based cleric Fethullah Gulen, a former Erdogan ally who has turned into his No. 1 foe. Government officials accuse Gulen's supporters of stopping the trucks as part of an alleged plot to bring down the government. The government has branded the movement a "terror organization" although it is not known to have been engaged in any acts of violence.

Prosecutors launched an investigation into the journalists after Erdogan threatened legal action against Dundar for publishing the images and said he would not let the issue go.

His comments prompted the media watchdog Committee to Protect Journalists to call on Erdogan to stop "bullying journalists ... just because he doesn't like what they report."