More than 300 people have been detained for criticising Turkey's offensive into Syria on social media, as the government cracks down on dissenters.

The Turkish government had warned it would prosecute anyone "opposing, criticising or misrepresenting" Operation Olive Branch.

The offensive into the Afrin region of Syria aims to oust the US-backed YPG Kurdish militia. The YPG is considered a terrorist group by Ankara due to its association with the Kurdistan Workers Party (PKK), which has been fighting an insurgency in south-eastern Turkey since 1984.

A total of 311 people have been arrested since the offensive begin 10 days ago. Those arrested include activists, journalists and politicians. The Turkish Interior Ministry said the detainees had been held for "spreading terrorist propaganda".

Despite government threats, several groups have spoken out against the operation. The Turkish Medical Association (TTB) condemned the action, saying: "No to war, peace immediately."

Turkish President Recep Tayyip Erdogan accused the TTB of treason, and said "they are not intellectuals at all, they are a gang of slaves. They are the servants of imperialism."

Turkish soldier in Afrin Syria
A Turkish soldier guards a position near the border Turkish-Syrian border during Operation Olive Branch NAZEER AL-KHATIB/AFP/Getty Images

The Turkish Engineer and Architect Chambers Association (TMMOB) supported the TTB's call for peace. Taking to Twitter, Deputy Prime Minister Bekir Bozdag said that neither the TTB nor the TMMOB should be allowed to use the word 'Turkish' in their names, claiming they did not represent Turkish medics, engineers and architects.

Though the TTB rejected the president's accusations, prosecutors opened an investigation into 11 members of the union's central administration on 29 January, Hurriyet newspaper reported.

One hundred and seventy artists have also written an open letter to members of Erdogan's ruling AK Party calling for an immediate halt to the invasion.

The UK-based Syrian observatory for Human Rights monitoring group says at least 55 civilians have been killed since the start of the offensive. The group says that nine Turkish soldiers and 76 Turkey-backed militiamen have died, while 78 Kurdish fighters have also been killed.

Turkish protests operation olive branch
A woman is arrested during a demonstration called by Halklarin Demokratik Partisi (Peoples' Democratic Party - HDP) members to protest against Operation Olive Branch in Syria OZAN KOSE/AFP/Getty Images