Canada's highest court will rule Thursday on whether the federal government had the constitutional right to pay off the debt with billions of dollars that had been collected to help jobless workers.

Two labour union organizations brought the case to the Supreme Court, arguing the government improperly diverted a roughly $54-billion employment insurance (EI) surplus into the regular revenue stream.

The large Quebec-based Confédération des syndicats nationaux and the Syndicat national des employés de l'aluminum argued that the current practice amounts to indirect taxation.

They want the money returned to contributors, both employees and employers, or used to defray future contributions.

A surplus should not exceed a reasonable amount for a contingency fund, the unions argued, suggesting around $10 billion to $15 billion would provide enough of a cushion.

Lawyers representing the attorney general argued that the government never violated the rights of contributors, and the EI account falls under the general revenue stream, meaning the funds can be applied in any manner.

The employment insurance fund began to swell after the government changed the rules in 1996 to make it more difficult for the unemployed to collect benefits.

Prime Minister Stephen Harper's Conservative government has announced plans to change the way it administers the EI fund, restricting use of the money solely to related benefits, but there has been no mention of repaying the $54-billion surplus at issue in the court challenge.

The federal government said in its 2008 budget that a Crown corporation called the Canada Employment Insurance Financing Board will manage any future surpluses and keep a $2-billion cash reserve for use during economic downturns.

EI premiums are set once a year by Ottawa based on employment expectations. Some employers complain the government has been underestimating, resulting in an ever-increasing surplus.

Auditor General Sheila Fraser has criticized the government several times for the way it has handled EI since 1999, with a surplus triple the amount that's necessary and a move away from the intent of the program.