BRUSSELS (AP) — Belgian prosecutors say they have reached a settlement worth nearly 300 million euros ($335 million) with a Swiss private banking branch of HSBC over a longstanding fraud and tax dodging case.

The Brussels prosecutor’s office said Tuesday it was able to reach a settlement partly because of a “change in the wealth management within HSBC,” noting the bank had stopped certain offshore services, improved transparency and appointed an anti-fraud director.

The prosecutor’s office had accused the company in 2014 of massive organized fiscal fraud, money laundering and forming a criminal organization to the benefit of over 1,000 wealthy clients that cost the Belgian authorities “hundreds of millions of euros.”

HSBC did not immediately reply to a request for comment.