It’s taken three and a half years and what the Speaker of the Senate calls “draconian steps” in the upper house, but the Conservative government has finally managed to pass a law that will tie unions in knots and potentially threaten the privacy of millions of Canadians.

If you missed this disturbing development, you’re not alone. The Senate, under heavy pressure from the government, forced through Bill C-377 on Tuesday afternoon, hours before Canada Day. And Russ Hiebert, the Conservative MP who first introduced the measure back in 2011, sent out a statement patting himself on the back for it at 5:28 p.m. that day — when hardly anyone was paying attention.

It’s telling that the Harper government worked so hard to get this bill into law just as Parliament was starting the summer recess that will segue into the fall election campaign. Bill C-377 is a classic example of a law that doesn’t meet any real social need — but is something the Conservatives can put in the window as bait for their electoral base.

In fact, it won’t go into effect until the end of the year, when the Canada Revenue Agency sets up the necessary regulations and forms for unions to report details of their spending, as required. And depending on how the voting goes on Oct. 19, it may never see the light of day. Both NDP Leader Thomas Mulcair and the Liberals’ Justin Trudeau have promised to repeal C-377 if they win power.

They’re right to do so. The new law promises to promote “transparency” by forcing unions to report every transaction they make worth $5,000 or more to the CRA, to make public the salaries of officials who make upwards of $100,000 a year, and to report details of any political activities they undertake. But as a host of critics have pointed out, the law’s real effect will be much more noxious:

It will force unions to spend a lot of time and money to prepare and submit some two dozen detailed statements to the tax man. They will have to identify the payer and payee in every transaction of $5,000 or more — including personal matters like health benefits. They will have to make public their budgets, spending, and such details as how much they plan to pay members if they go on strike.

It will impose burdens and potential penalties (up to $1,000 a day) on unions that aren’t faced by any other independent organizations — businesses, non-profits, political parties, even government agencies. That, despite the fact that unions already must provide regular financial reports to their members.

It threatens the privacy of millions. The former federal privacy commissioner, Jennifer Stoddart, warned in 2012 that the bill could infringe on the privacy rights of anyone who provides services to a labour organization. She called it a “significant privacy intrusion” and “highly disproportionate.”

It’s quite likely unconstitutional. Seven provinces — including Ontario — have officially protested the law, arguing that it infringes on provincial jurisdiction over labour relations.

It sets a worrisome precedent. The Conservatives have targeted one of their favourite whipping boys — the labour movement — with C-377, but this kind of intrusive legislation could easily be turned against other groups, depending on the whims of the government of the day. Hugh Segal, the former Conservative senator, has warned bluntly that “we are headed with this bill … to a very dark place indeed.”

Two years ago Segal led a revolt of 16 Conservative senators that derailed C-377. The government prorogued Parliament, then brought the bill back and pressured its members in the Senate to cut off debate and finally make it law.

It was a bad idea when it was first introduced, and it hasn’t gotten any better since then. The opposition parties are right to condemn it, and voters should make it part of their calculation when they go to the polls in October.