What happens when a government builds a massive, unaccountable police apparatus to thwart infiltration by a foreign menace, only to see the society it's supposed to protect take to the streets for entirely different reasons?

It looks as though we may be about to find out. The Occupy protests have been mostly peaceful, with a few fairly dramatic exceptions. But the sight of a huge police presence in riot gear is always startling, and tactics that have been honed in Europe (such as "kettling") against anarchist actions have not been as common in the United States as elsewhere. More standard forms of crowd control, such as the aggressive use of pepper spray and "rubber" bullets have so far been the outer limits of the police use of force. But it is hardly the outer limits of the possibilities.

The US has actually been militarising much of its police agencies for the better part of three decades, mostly in the name of the drug war. But 9/11 put that programme on steroids.

Recall that six short weeks after the September 11 terrorist attacks, the US congress passed the PATRIOT Act, a sweeping expansion of domestic and foreign intelligence-gathering capabilities. This legislation gave the government the ability to easily search all forms of communication, eased restrictions on foreign intelligence-gathering at home, gave itself greater power to monitor financial transactions and created entirely new categories of domestic terrorism to which the PATRIOT Act's expanded powers to police could be applied.

It was one of the greatest expansions of government police power in history, an expansion which, after some tweaking, has been mostly validated by the congress and reaffirmed by the courts.

A little more than a week after the PATRIOT Act was passed, President Bush created the Office of Homeland Security to "develop and coordinate the implementation of a comprehensive national strategy to secure the United States from terrorist threats or attacks" and a year later, the Department of Homeland Security was established by the Homeland Security Act of 2002.

Today it is the third-largest government agency, after the departments of defence and veterans' affairs. Aside from the billions the federal government spent on its own agencies, it has disbursed many billions more to various state and local police agencies, ostensibly for the purpose of fighting the terrorist threat.

Campus police with M-16s

More often, it created new surveillance opportunities for non-terrorist activity. In one notorious case from 2006, it was revealed that Homeland Security had given the remote Alaskan village of Dillingham (population 2,400) $202,000 to purchase surveillance cameras in order to track alleged terrorist activity.

Needless to say, Dillingham was not on any known terrorist's target list, so the only people the surveillance cameras were watching were the citizens. But surveillance wasn't the end of it.

"It wouldn't be surprising to find that swaggering around armed to the teeth and dressed like RoboCop might lead some cops to adopt a more militaristic attitude."

As reported by Radley Balko in the Huffington Post, a Pentagon programme - started in the 1980s - to give military equipment to local police escalated in the 2000s, with even university campus police receiving everything from M-16s to armoured personnel carriers. Balko quoted one county sheriff saying that he'd use his new Homeland Security-funded SWAT team "for a lot of other purposes, too ... just a multitude of other things".

All over the country, police switched out their traditional uniforms for Battle Dress Uniforms, dubbed by one retired policeman in the Washington Post as "commando-chic" regalia. It wouldn't be surprising to find that swaggering around armed to the teeth and dressed like RoboCop might lead some cops to adopt a more militaristic attitude.

Former San Jose chief of police Joseph McNamara raised these alarms as early as 2006 in the wake of the Sean Bell shooting in New York. He pointed out that the effects of the drug war and 9/11 had led to "an emphasis on 'officer safety' [where] paramilitary training pervades today's policing, in contrast to the older culture, which held that cops didn't shoot until they were about to be shot or stabbed".

Likewise, in the name of "officer safety", the Taser became a common tool in everyday policing, deployed with little knowledge of the effects, and a tendency to Taser first and ask questions later. But over the course of the past decade, the body count grew as it became more and more obvious that tasers were sometimes as deadly as the guns they purported to replace.

'Pain compliance'

And that's the most prosaic of the new policing toys that are becoming available. Reporter Ando Arick analysed the new generation of weaponry in an article in Harper's called "The Soft-Kill Solution - New Frontiers In Pain Compliance". He recounts a 60 Minutes investigation into a new weapon to be used for what the military said was "crowd control in Iraq".

Yet in military exercises in Georgia, soldiers were dressed as protesters, carrying signs that say "world peace", "love for all" and "peace not war" for some reason. In what was presented as a choice between backing off and shooting into the crowd, the audience was then shown that a "ray gun" was on top of the Humvee.

"An operator squeezes off a blast. The first shot hits them like an invisible punch. The protesters regroup, and he fires again, and again. Finally they’ve had enough. The ray gun drives them away with no harm done."

Except for the repeated "invisible punches", of course. But like the Taser, the whole point of this "pain compliance" is to inflict short-term physical agony on human beings to "induce behavioural modification".

They have developed plans for a flying drone that fires stun darts at suspects, a "Shockwave Area-Denial System", which blankets the area in question with electrified darts, and a wireless Taser projectile with a 100-metre range, helpful for picking off "ringleaders" in unruly crowds.

Would the public balk? Probably not. After all, they've accepted the Taser to such an extent that it's now a staple of movie comedies and viral YouTube videos. The ground has been well-prepared. And after all, just as the government has expanded its police powers and built up its arsenal of "pain compliance" weaponry, the broader culture was lifting the centuries-old taboo against torture.

It was an abstract and obscure debate that took on a surreal cast when it was revealed that early government brainstorming meetings about interrogation tactics at Guantanamo relied heavily on the question, "What would Jack Bauer do?"

Jack Bauer, of course, was a fictional character in the then-popular television show "24", a secret agent who was known for his willingness to break any law and social norm in the pursuit of a ticking time bomb. He was specifically admired for his innovative torture techniques.

This character was a great favourite of high-ranking members of the government - notorious torture memo author John Yoo cited him in his memoir, and even Justice Antonin Scalia once publicly exclaimed: "Jack Bauer saved Los Angeles ... He saved hundreds of thousands of lives. Are you going to convict Jack Bauer?"

The idea that sometimes the threat was so great that authorities had no choice but to set aside even deep cultural taboos was promulgated by the most powerful people in the nation.

The lesson from that debate was that there are times when the government has to, as Vice-President Dick Cheney famously described it, "take off the gloves". What wasn't decided was the criteria the nation would use to decide when that "time" was.

Today we are in a different world.

Economic justice

No longer is the nation obsessed with the terrorism threat. Guantanamo is rarely mentioned. Osama bin Laden is dead. The president has declared that the "enhanced interrogation techniques" have ended. A few stalwart civil libertarians are still fighting in the courts, but the nation's attention has turned to a new threat - economic injustice, income inequality and political corruption. And they are taking their grievances into the streets all over the country.

So far, there have been few clashes between the Occupy forces and the police, although Oakland and New York have both seen some dramatic confrontations and the events at the UC campus in Berkeley last week were downright brutal. There have been many arrests, however, and some of the communities are starting to react unfavourably to the demonstrators, demanding that the occupations disperse. The big question for everyone is what will happen if they don't.

Arick concluded his Harper's report with an ominous observation:

"Each year, some 76 million people join our current 6.7 billion in a world of looming resource scarcities, ecological collapse and glaring inequalities of wealth; and elites are preparing to defend their power and profits. In this new era of triage, as democratic institutions and social safety nets are increasingly considered dispensable luxuries, the task of governance will be to lower the political and economic expectations of the masses without inciting full-fledged revolt. Non-lethal weapons promise to enhance what military theorists call 'the political utility of force', allowing dissent to be suppressed inconspicuously."

The United States has never had fully militarised police before, armed with the kind of high-tech surveillance and weaponry that would never be allowed if the National Guard were called up in an emergency. And neither have we ever had such a malleable definition of what constitutes an emergency. At a time of increasing citizen unrest, it's a volatile combination.

Certainly the government seems to have been preparing for such confrontations for some time now.

Whether the people will accept high-tech "pain compliance" to "modify" dissent remains to be seen. If the attitude towards Tasers is any guide, many won't have a problem with it and "enhanced interrogation" of terrorist suspects has become, at best, a moral grey area for many in the US.

We have essentially normalised torture and created a high-tech police apparatus with more capability than any military in history. Human nature suggests that if you build it, they will use it.