The B.C. agency responsible for managing public-sector pension plan investments is constitutionally immune from remitting goods-and-services taxes related to those portfolios, the Supreme Court of Canada has decided.

However, the top court ruled Friday the British Columbia Investment Management Corporation, a Crown agency, still might be on the hook for GST payments to the federal government due to taxation agreements between B.C. and Ottawa.

The management corporation had been ordered to pay almost $40.5 million in GST, plus interest and penalties, for delivering investment-management services for pooled portfolios.

The corporation then sought a declaration from the Supreme Court of British Columbia that it was immune from federal excise taxes.

A B.C. judge ruled in 2016 that the federal government could not order the corporation to remit the GST on the basis that, as an agent of the provincial Crown, it enjoyed the same immunity from federal taxes as the province.

However, the judge also found the corporation was bound by two taxation agreements between B.C. and the federal government that may require the Crown agency to collect and remit certain taxes.

The ruling was upheld last year by the B.C. Court of Appeal.

In its 6-1 decision Friday, the Supreme Court of Canada affirmed the lower-court decisions.

In writing for the majority, Justice Andromache Karakatsanis noted intergovernmental immunity from taxation grants each level of government “operational space” to govern without interference. “It also prevents one group of elected representatives from dictating how another legislative body should allocate the financial resources under its control.”

She added that by entering into the agreements with Ottawa, “the provincial Crown chose to pay taxes for which it would not otherwise have been liable.”

But even after the high court ruling the nature of any specific obligations the corporation might have under the taxation agreements remained unclear, since those questions went beyond the scope of the decision.