When Spain first started making noises about an impending "Citizens' Security Law" that would criminalise various forms of popular protest, optimists may have assumed the flirtation with overt fascism couldn't last. At the very least - they might have reasoned - the government would have to retreat to semi-fascist mode.

Not so.

Approved on March 26, and expected to come into force on July 1, the law might be mistaken for something out of the Franco playbook. Dubbed the "gag law", it prescribes fines of up to 600 euros ($635) for disrespecting police officers, up to 30,000 euros ($32,000) for disseminating images of state security forces that might endanger them or their operations, and up to 600,000 euros ($635,000) for unauthorised street protests.

Inverse logic

These punitive measures are especially handy, of course, in an era of brutal austerity measures, home evictions, and other government efforts in Spain that have triggered collective action on a mass scale. In 2012, evictions were reportedly occurring at a pace of 500 per day.

While conveniently pre-emptively criminalising protests against the legislation itself, the gag law relies on an inverse logic, in which the real threat to citizens' security comes not from the lack of a roof over one's head or a physically abusive police force but rather from opposing the injustice of such realities.

In an open letter to the European Parliament, human rights groups warned that targeting those who disseminate images of police "could hinder the documentation and reporting of abuses committed by law enforcement personnel and reinforce the climate of impunity".

Expelling justice

Tacked onto the bill as a last-minute bonus is a provision validating the summary expulsion of migrants who jump the border fence between Morocco and Spain's African outposts of Ceuta and Melilla.

After all, we can't possibly have "citizens' security" with too many black folks in the mix.

As noted on the website of the International Federation for Human Rights, the move not only "restrict[s] the right to seek asylum and violate[s] the principle of non-refoulement and the prohibition of collective expulsions" but also "exposes migrants to a serious risk of torture and ill-treatment by denying them the possibility of filing a claim against law enforcement personnel in case of abuse".

Of course, no citizenry would be completely secure without robust protections against 'terrorism' - that time-honoured threat that has, particularly in the post-9/11 era, been invoked to justify the trampling of rights worldwide.

But the anti-migrant provision is merely the culmination of an already common practise of automatic deportation along the Spanish frontier. In October 2014, the AFP reported on a video of truncheon-happy Spanish police beating a young, barefoot Cameroonian man and then escorting him, in an apparently unconscious state, back to Moroccan territory.

Another good reason to discourage filming the police at work - and another reason the 600-euro fine for disrespecting the police seems a tad steep.

The old terrorism card

Of course, no citizenry would be completely secure without robust protections against "terrorism" - that time-honoured threat that has, particularly in the post-9/11 era, been invoked to justify the trampling of rights worldwide.

In addition to the Citizens' Security Law, the Spanish government has also approved reforms to the nation's criminal code that will greatly enhance its punitive capabilities.

For example, folks will now be eligible for prosecution as terrorists for such behaviour as regularly visiting websites deemed to be terrorist-friendly. Helpfully, the criminal code's definition of "terrorism" is sufficiently sweeping to prevent any potential offenders from slipping through the cracks.

Included on the list of terroristic acts are efforts to disrupt government functions and "the public peace", as well as "the commission of any serious crime against … liberty".

A recent article on the Spanish Gizmodo website points out that internet activity alone "can be punished with one to five years in prison".

Makes you wonder about the whole "liberty" clause.

The next step

Last month, the Guardian quoted Jorge Fernandez Diaz - Spain's interior minister and the curator of the Citizens' Security Law - on the merits of the initiative: "It's a law for the 21st century. It provides better guarantees for people's security and more judicial security for people's rights."

In a matter of three seconds, an item worthy of interment in Franco's mausoleum was thus recast as the pinnacle of modernity and justice.

By this logic, regression is progress, slavery is freedom, and black is white.

Meanwhile, according to the Spanish daily El Pais, a December survey indicated that 82 percent of respondents believed the law needed to be abandoned entirely or at least modified, while 79 percent considered the prescribed fines excessive. Seventy-one percent contended that the project did not aim to ensure public security but rather to protect the government from protests.

It seems there's only one thing left to do: Outlaw public opinion surveys.

Belen Fernandez is the author of The Imperial Messenger: Thomas Friedman at Work, published by Verso. She is a contributing editor at Jacobin Magazine.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial policy.