GENEVA (AP) — HSBC will pay 40 million Swiss francs ($43 million) to settle an investigation by Geneva prosecutors over allegations the bank helped rich clients avoid taxes.

The bank and prosecutors said Thursday the settlement ends the investigation into HSBC Private Bank (Suisse) SA and persons unknown for suspected aggravated money laundering. The investigation unfolded after an ex-employee leaked a list of thousands of suspected tax evaders to French authorities in 2008.

France shared the list with other governments and launched investigations, and the International Consortium of Investigative Journalists and news organizations found that the bank hid millions of dollars for wealthy people.

In a statement, HSBC says it has improved practices to keep clients from using the bank "to evade taxes or launder money," and drastically reduced the number of accounts, from 30,000 to 10,000.

The Geneva prosecutor said Thursday's settlement "avoids the uncertainties of a long and complex legal case."