HSBC said it agreed to pay $62.5 million to settle a class action brought against it in the United States over its role in providing administrative services to a fund which placed cash with Wall Street swindler Bernard Madoff.

The action was brought by investors in Thema International Fund, which transferred a net $312 million to Madoff, Europe's biggest bank said on Tuesday.

Madoff is serving a 150-year prison sentence after pleading guilty in March 2009 to orchestrating what is considered to be the biggest Ponzi scheme in history.

HSBC said it continued to vigorously defend itself in other Madoff-related proceedings brought against it and its subsidiaries.

(Reporting by Myles Neligan; Editing by David Holmes)

(This story is corrected in headline and first paragraph to make clear HSBC agrees to pay, not had paid)