The Supreme Court of Canada has ruled that the World Bank Group has immunity from being forced to produce documents or provide its own employees as witnesses in Canadian legal cases.

It’s an important decision that goes to the heart of the Bank’s ability to fight against corruption and bribery in many of the projects it funds in the developing world.

The case arose because an Ontario lower court judge ordered the Bank to disclose information in a Canadian bribery case, threatening what the Bank, an international organization composed of 188 member countries, including Canada, considers its autonomy and independence.

“In our respectful view,” the unanimous decision from the top court said, “the trial judge erred in construing so narrowly an immunity that is integral to the independent functioning of international organizations.”

Toward the end of World War II, Canada was signatory to the international treaty at Bretton Woods, N.H. that formed the World Bank and International Monetary Fund and in doing so, agreed to abide by its conditions, said the decision Friday.

“It is part of the original agreement that in exchange for admission to the international organization, every member state agrees to accept the concept of collective government. As a result, no single member can attempt to control the institution …”

Had the highest court ruled against the World Bank, it’s possible the bank could have claimed Canada was breaking international law.

And a negative ruling towards the bank would have been ironic, since, in 2013, Canadian companies topped the list of organizations banned from doing business with it. Dozens of Canadian companies are on the latest list of companies that have been banned, or, as the bank puts it, “debarred” due to corruption allegations or improper behaviour.

The case before the court was over bribery charges against officials of SNC Lavalin, the Montreal-based engineering company that is also facing charges for bribery in Libya.

Kevin Wallace, a former SNC Lavalin senior executive, along with Zulfiquar Bhuiyan, a Canadian-Bangladeshi citizen, were charged in 2013 with bribing a foreign public official over a contract to supervise the construction of the planned 6-kilometre long Padma Bridge in Bangladesh.

The bridge proposal was an enormous $2.9 billion undertaking with over a billion of the money coming from the World Bank. After the bribery allegations, the bank cancelled its involvement in the construction of the bridge.

The World Bank Group’s founding purpose was to provide aid to developing countries. From the beginning, the bank did not operate on the assumption that paying bribes is the cost of doing business in the parts of the world it wants to help. It maintains its own investigative unit to conduct extensive inquiries if it hears of fraud or bribery taking place in one of its projects.

But the bank cannot initiate criminal proceedings. Instead, it punishes contractors by barring them from bidding on bank projects for a period of time, as it did when it banned SNC Lavalin from bidding for ten years. The Padma Bridge project was cancelled.

The matter wasn’t over – the bank handed over most of its extensive investigative files to the RCMP, who eventually charged Wallace and several others. At trial in Toronto, defence lawyers for Wallace and Bhuiyan demanded the World Bank disclose all its case files, not just the material given to the RCMP.

Ontario Superior Court Judge Ian Nordheimer agreed.

The Bank insists it has to protect its sources, particularly its network of tipsters and informants who could refuse to co-operate if they feared a foreign court might reveal their identities. In information filed with the court, it notes its member countries “have pledged they will not attempt to unilaterally garner an undue share of influence over the organization’s affairs through national laws and judicial actions.”

Just because the Bank fed the RCMP information doesn’t mean it implicitly waived its immunity said the highest court.

If there were to be such an “implied” waiver, Justices Michael Moldaver and Suzanne Côté, writing for the court, said, the World Bank would be subject to a “chilling effect” that would be “harmful, since multilateral banks … are particularly well-placed to investigate corruption and to serve at the front lines of international anti-corruptions efforts.”

The Bank’s position was supported by the government of Canada – the Crown – as well as by numerous international development banks. An intervener in the case, Transparency International Canada, a group fighting corruption in the developing world, pointed to the urgency of protecting whistleblowers whom it says “may be fired, sued, black-listed, arrested, threatened, or, in extreme cases, assaulted or killed.”