Turkish police on Tuesday arrested more than 170 people in Istanbul and Ankara as a month of student protests against President Recep Tayyip Erdogan witnessed some of their most violent clashes to date.

Turkey has been hit by rallies across major campuses since last month after Erdogan decided to name a party loyalist as the head of Istanbul's exclusive Bogazici University at the start of the year.

Some 104 people were arrested in the sprawling commercial hub of Istanbul and another 69 in the capital Ankara, police said in two statements.

Turkey has been hit by weeks of student rallies across major campuses
Turkey has been hit by weeks of student rallies across major campuses AFP / Adem ALTAN

Police fired tear gas and plastic bullets at protesters in Istanbul and shielded themselves from missiles hurled from buildings.

Police also knocked several protesters to the ground, an AFP photographer said.

AFP reporters saw plainclothes police drag away dozens of students when they tried to march along a central street in the capital Ankara on Tuesday.

An AFP reporter estimated that 50 to 60 people had been detained in Istanbul by Tuesday evening
An AFP reporter estimated that 50 to 60 people had been detained in Istanbul by Tuesday evening AFP / Bulent Kilic

The rally had been banned on coronavirus grounds but several opposition lawmakers still turned up.

The sound of clanging pots and pans rang out across various parts of the sprawling city at sunset after organisers called on their supporters to make noise in a show of strength.

The standoff over the rector gained a new dimension when protesters hung a poster near his office depicting Islam's holiest site covered in LGBT imagery last week.

A man clashes with Turkish Police detaining activists supporting Bogazici University students protesting against the appointment by the Turkish government of a new rector in Ankara
A man clashes with Turkish Police detaining activists supporting Bogazici University students protesting against the appointment by the Turkish government of a new rector in Ankara AFP / Adem ALTAN

Interior Minister Suleyman Soylu tweeted on Saturday that "four LGBT freaks" had been detained for "inciting hatred" with their poster.

Twitter took the rare step of hiding that message under a warning that it violated the platform's "rules about hateful conduct" -- the same thing it did to tweets from former US President Donald Trump before banning him last month.

AFP reporters saw plain clothes police drag away dozens of students when they tried to march
AFP reporters saw plain clothes police drag away dozens of students when they tried to march AFP / Adem ALTAN

Soylu posted a new message on Tuesday asking why Turkey should "tolerate LGBT deviants".

Twitter hid that message under another "hateful content" warning that requires an extra click to see what the minister said.

Anti-riot police using shields fired tear gas to disperse a crowd of around 1,000 people in Istanbul, including some carrying LGBT rainbow flags in support of past detainees.

An injured Turkish man stares at a policeman during the latest in a wave of anti-government  demonstrations
An injured Turkish man stares at a policeman during the latest in a wave of anti-government demonstrations AFP / Bulent Kilic

The youth-driven demonstrations have echoes of 2013 protests that sprang up against plans to demolish an Istanbul park before spreading nationally and presenting a direct challenge to Erdogan's rule.

Students have relied heavily on Twitter to get their message out.

Most Turkish television stations and newspapers are controlled by government allies and the demonstrations have barely been mentioned by state media.

And the bond between Turkish protesters and Twitter appears to be growing stronger by the day.

Twitter has been one of the few platforms to resist a new Turkish requirement for social media giants to appoint local representatives who can quickly follow court orders to take down contentious posts.

Turkey hit Twitter with an advertising ban as punishment last month.

Twitter's continued resistance could make it effectively inaccessible inside Turkey should officials follow through on threats to cut off its bandwidth by 90 percent in May.

Major platforms such as Facebook and TikTok have appointed local envoys and will avoid future fines and bans.

Soylu's tweets add to the social pressure on the LGBT community under Erdogan's increasingly conservative rule.

Homosexuality has been legal throughout modern Turkey's history but Istanbul Pride has been banned since 2016.

Erdogan on Monday accused the LGBT protesters of "vandalism".

"We will carry our young people to the future, not as the LGBT youth, but as the youth that existed in our nation's glorious past," Erdogan told his supporters.

Soylu has not publicly commented on Twitter's decision to hide his posts.