Greece’s newly elected, centre-right government has ignored leftists’ protests to overturn a law that had prohibited police from entering universities.

In a stormy debate preceding Thursday’s vote, the prime minister, Kyriakos Mitsotakis, insisted the old law – regarded as sacrosanct in a country that had once known military rule – had turned campuses into dens of criminality and no-go zones for police.

“We don’t want police in university. However, we do want to get rid of the hoodies who police the lives of students,” he told parliament, referring to the self-styled anarchists who frequently seek sanctuary in campus buildings.

“During a typical student’s life, he will see faculties controlled by a manner of different groups, drugs and basements full of petrol bombs and hoodies.”

In recent years academics have been attacked on university sites, while drug addicts have been seen shooting up in broad daylight on campuses.

The law that has barred security forces from universities for close to 40 years was drafted in response to the decision of Greece’s colonels to send a tank crashing through the gates of Athens’ Polytechnic in 1973 – a move that resulted in the deaths of 23 students.

On 17 November, the anniversary of that event, the Polytechnic often resembles a war zone as police battle it out with anarchists and other youngsters lobbing Molotov cocktails at them from inside the premises.

The so-called asylum law was conceived as a safeguard against students ever again suffering the heavy hand of authoritarianism. But, in a society prone to protesting by rioting, many believe the ban had outlived its usefulness and had helped breed a culture of violence that has frequently driven Greeks to seek higher education abroad at great expense.

The governing New Democracy party, catapulted into office barely a month ago, had made abolishing the law a centrepiece of proposed plans to improve public safety.

Leftists targeted by the colonels’ regime during the seven years it held sway in Athens between 1967 and 1974 view the law as an integral and sacred part of democracy. Similarly, leftwing students have long described it as a guarantee of the free movement of ideas.

Before the vote, fiery demonstrations had taken place in protest against the measure being reversed. More are planned.

Addressing the 300-member chamber, Alexis Tsipras, the former prime minister who is now the main opposition leader, lambasted the move as a concerted step to undermine the public nature of universities by a government bent on privatising tertiary education. The 45-year-old leader first came to prominence as a leader of sit-ins at schools.