Royal Bank of Canada says it has closed the accounts of 40 clients following an internal review of its operations after the bank was named in a leak of documents from a Panamanian law firm that specializes in helping wealthy clients avoid taxes by stashing money offshore.

As first reported by Bloomberg, the bank confirmed to CBC News in an email Wednesday that it closed the accounts of about 40 clients and bolstered its internal compliance after concluding a probe of its own business.

The bank was named in the so-called Panama Papers, a massive dump of 11 million documents that showed how Panamaniam law firm Mossack Fonseca had set up more than 200,000 offshore corporations that helped foreign nationals avoid paying taxes where they lived.

At least 625 Canadians were named in the papers, and the documents revealed that the bank set up 370 offshore companies for clients using the law firm.

While the bank notes that there’s no evidence that any of those companies were doing anything illegal, RBC was co-operating with Canadian tax authorities while conducting its own internal investigation. 

Since last April, the bank has been poring over four decades worth of records and concluded that the bank’s dealings with Mossack Fonseca represented an “extraordinarily small proportion of our total client base.”

The accounts that have been closed — less than 0.001 per cent of RBC’s client base — were shuttered because they no longer fall within the bank’s risk-tolerance levels, RBC said.