Hundreds of protesters have gathered outside the office of an opposition newspaper in Istanbul after two journalists were jailed pending trial for reporting on alleged Turkish arms smuggling to Syria.

The demonstrators accuse the government of silencing critics and attempting to cover-up a scandal after Cumhuriyet's editor-in-chief Can Dundar and the paper's Ankara representative Erdem Gul were jailed over terror and espionage charges.

The pair were sent to a prison in Istanbul late on Thursday, accused of willingly aiding a terror organisation and revealing state secrets.

The incident comes amid deepening concerns over media freedoms in Turkey, which aspires to join the European Union.

In May, the 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, causing a stand-off 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.

However, some officials later suggested that the trucks were in fact carrying arms or ammunition destined to Turkmen in Syria.

Prosecutors launched an investigation into the journalists after President Recep Tayyip Erdogan filed a criminal complaint.