Spain's ruling People's party has drafted strict new laws against public protests, in a move denounced by the opposition as a blow to democracy.

The legislation, expected to be presented in a cabinet meeting on Friday, would introduce steep fines for activists who take part in unauthorised protests, publish images of police or interrupt public events.

Demonstrating near parliament without permission could result in a fine of up to €600,000, while insulting a police officer during a demonstration could cost up to €30,000.

The prime minister, Mariano Rajoy, said the law was not meant to gag citizens but protect them. "One of the obligations of the government is to guarantee the liberty and security of all of its citizens," he said.

But Joan Coscubiel, a spokesperson for the Izquierda Plural group in parliament, called the law a "kick in the teeth for democracy".

The proposed law has outraged activists. "It's an attack on one of the pillars of our democracy," said Stéphane Grueso, a Madrid-based activist and blogger.

Previously, he said, actions such as demonstrating outside the homes and offices of public figures would land protesters in court, defending their actions in front of a judge. But this legislation would automatically deem certain tactics to be outside of the law.

"It worries me how the government has decided, all of a sudden, that they didn't need judges and that they could solve everything themselves," Grueso said.

Manuel Ballbé, a law professor at the Autonomous University of Barcelona, said the legislation was less about cracking down on demonstrators and more about winning votes for the conservative government.

"They need to radicalise these movements, to create a climate of violence. Then the government can come out and show that they are the best party to institute law and order," he said. "Despite the crisis, there hasn't been any increase in crimes or violence. With six million unemployed and half of our youth unemployed, there's been no rise in delinquency."

The anti-eviction leader Ada Colau called on her nearly 100,000 Twitter followers to stage a day of general disobedience if the law is passed. Her group, the Mortgage Victims' Platform, added their own message aimed at those promoting the law: "We're not scared. We know the power that we the people have."