HSBC has agreed to pay nearly 300 million euros to end a Belgian criminal investigation into allegations of massive fraud and money-laundering involving wealthy diamond traders, prosecutors said on Tuesday.

The allegations, which related to a Swiss subsidiary of the British banking giant and ran into hundreds of millions of euros, mainly involved assets owned by wealthy clients in Antwerp, the world's main diamond-trading hub.

Prosecutors said the subsidiary, HSBC Private Bank SA (Suisse), had helped hundreds of rich clients cheat the Belgian taxman including by giving them access to offshore accounts in overseas tax havens.

The allegations "date back a number of years and involve soliciting and managing the assets of wealthy clients, mainly from the Antwerp diamond industry," prosecutors said in a statement.

"The Swiss bank is also suspected of knowingly favouring and encouraging tax fraud, giving favoured clients access to offshore accounts, particularly in Panama and the Virgin Islands."

In late 2014, following raids by the special financial division of the Belgian police, the bank was charged with serious and organised fraud, money-laundering, criminal conspiracy and illegally functioning as a financial intermediary.

As well as paying 294.4 million euros ($330 million) as a criminal fine, the bank will also hand over 400,000 euros in civil damages to the Belgian state.

Prosecutors said that in the past five years the bank had undertaken major reforms to make it less likely to be involved in illegal financial transactions, including halting services related to offshore accounts and appointing new compliance staff.