Harvard University has announced it will now not accept $8.6m in relief from the Coronavirus Aid, Relief and Economic Security (Cares) Act after Donald Trump lambasted the institution for taking the funds despite its endowment.

The university said in a statement that it would face “significant financial challenges” because of the coronavirus pandemic along with other institutions, but was concerned about “the intense focus by politicians and others on Harvard” in connection to the relief program.

Although Harvard said it initially accepted the funding “for the purpose of helping students and institutions whose financial challenges in the coming months may be most severe”, the university said on Wednesday it would forgo the federal stimulus payment.

“As a result of this, and the evolving guidance being issued around use of the Higher Education Emergency Relief Fund, Harvard has decided not to seek or accept the funds allocated to it by statute”, the statement read.

The university’s relief funding stirred controversy after the president attacked Harvard during a White House press briefing earlier in the week, suggesting it had taken money from funds meant for American workers. The school had actually been allocated money through the Cares Act Higher Education Emergency Relief Fund.

“They have to pay it back, I don’t like it”, Mr Trump said. “This is meant for workers – this isn’t meant for one of the richest institutions.”

The university clarified on Twitter that it had not taken money from the US Small Business Administration’s Paycheck Protection Programme as the president had suggested, writing: “President Trump is right that it would not have been appropriate for our institution to receive funds that were designated for struggling small businesses.”

Harvard also said earlier in the day that it had committed “100 per cent of these emergency higher education funds … to provide direct assistance to students facing urgent financial needs due to the Covid-19 pandemic”.

“Harvard should give back the money now,” the president wrote in a tweet on Tuesday night. “Their whole ‘endowment’ system should be looked at!”