The Ivy League school is following the actions of Stanford and Princeton universities, which also turned down funds amid growing scrutiny

Harvard University announced on Wednesday it will turn down $8.7m in federal coronavirus relief, a day after Donald Trump excoriated the wealthy Ivy League school over taxpayer money it stood to receive.

It followed similar actions at Stanford and Princeton universities, which said they, too, will reject millions of dollars in federal funding amid growing scrutiny of wealthy colleges.

Officials at Harvard said the school still faces significant financial challenges due to the pandemic but will refuse the money over concerns that “intense focus by politicians” will undermine the relief program created by Congress.

“While we understand any reallocation of these resources is a matter for the Department of Education, we hope that special consideration will be given to Massachusetts institutions that are struggling to serve their communities and meet the needs of their students through these difficult and challenging times,” Harvard said in a statement.

Congress is offering $14bn to the nation’s colleges and universities as part of a $2.2tn rescue package. Schools were allotted varying sums based on their size and the number of students they teach from poorer backgrounds.

But Trump said on Tuesday that Harvard “shouldn’t be taking” its share because it has such deep financial reserves. It echoed concerns from other critics, including some alumni, who said Harvard doesn’t need the money and can rely on its nearly $40bn endowment.

Harvard University had earlier rejected calls to return the stimulus funding, saying it planned “to direct 100% of the funds to financial assistance to students, and will not be using any of the funds to cover institutional costs”.

The university said it received the grant through the educational relief scheme that was part of a stimulus passed at the end of March, which also included a fund aimed at helping small businesses.

That business fund has been riddled with controversy after disclosures that larger companies received bailout funds while many small businesses, among the hardest hit by the coronavirus crisis, still await aid. Large companies are facing a similar pressure to universities to return the funding. On Monday the hamburger chain Shake Shack said it would return the small business loan it had received from the government, the first major firm to hand back money.

The education secretary, Betsy DeVos, on Wednesday said other rich schools should reject the funding. Affluent schools that do not primarily serve low-income students “do not need or deserve additional taxpayer funds”, she said in a statement.

“Schools with large endowments should not apply for funds so more can be given to students who need support the most. It’s also important for Congress to change the law to make sure no more taxpayer funds go to elite, wealthy institutions,” she said.

Stanford, which has an endowment of nearly $28bn, said it told the education department on Monday it would refuse $7.4m allocated in the package. Officials at Princeton also said they will reject $2.4m in aid.

But some of the richest colleges still plan to take the funding. Cornell University, with a $7.3bn endowment, says it plans to accept $12.8m in relief and use it entirely on student grants. The University of Notre Dame said on Wednesday it too will accept its $5.8m allotment and direct it all to students; the school’s endowment totals $11.3bn.

Terry Hartle, a senior vice-president with the American Council on Education, an association of college presidents, said Congress did not exclude any type of institution when it created the formula used to distribute funding.

“All schools means all schools: barber colleges, dance schools, community colleges, publicly traded for-profit schools and elite universities,” said Terry Hartle, the group’s senior vice-president. “Congress could have, but did not, exclude any category of institution.”