Facing a public backlash and pressure from the Trump administration, wealthy universities are declining funding from the stimulus package designed to help schools and students pummeled by the coronavirus pandemic.

Even as they turn over campus buildings to house emergency workers, treat sick patients in their hospitals, race to find vaccines and implement their own budget cuts in the cratering economy, some top universities said they would not accept federal relief money.

Harvard University announced Wednesday that it would ask the Education Department to reallocate $8.6 million that had been directed to the school. It had faced criticism from President Trump, Education Secretary Betsy DeVos and others for accepting the money, which it said it intended to use to help students with urgent financial needs caused by the pandemic.

Trump said Tuesday that Harvard should pay back the money, and DeVos on Wednesday called on Congress to change the law so that taxpayer funds don’t go to “elite, wealthy institutions.”

DeVos praised Stanford University, which opted out of $7.3 million in relief funds earlier this week:

Princeton University also announced it would not accept the $2.4 million it stood to receive. “Our no-loan financial aid packages and other programs are designed to provide exceptional levels of support to our students, including DACA beneficiaries and international students,” who are not eligible for the emergency grant money. “We remain committed to providing this support,” Ben Chang, a spokesman for Princeton, wrote in an email.

Yale University will not seek the nearly $7 million it was eligible to receive, school officials announced Wednesday night, adding that they hope the money could be redirected to schools in Connecticut that may not survive the crisis. More than half of Yale’s undergraduates receive financial aid, and the school gave emergency grants as this semester was upended. School officials reassured students that support will continue.

The University of Pennsylvania will not apply for or accept funds through the Cares Act, a spokesman said Thursday, despite the serious financial impact of the pandemic.

Higher education leaders had asked Congress for more than $50 billion in aid, predicting that the emergency response to the public health crisis would cost schools hundreds of billions of dollars. The stimulus bill ultimately included $14 billion for higher education, most of which is earmarked for emergency grants to students in need of help with child care, housing and food. (Guidance issued Tuesday by the Education Department narrows student eligibility to only those who can participate in federal student aid programs, which effectively shuts out undocumented and international students.)

More than 5,000 colleges and universities are entitled to receive money, with public four-year universities taking in the largest share. But using federal aid to help schools with massive endowments became a lightning rod this week.

Like all universities, Stanford is facing significant financial pressures and sustained uncertainty from a combination of lost revenue, increased costs, and a market downturn. Stanford, like many schools, is committing significant funds to combat the pandemic on multiple fronts including research, health care and community aid.

But the crisis brings an existential threat to many smaller colleges and universities in the United States, school officials said in a written statement, and they concluded that keeping those institutions viable, to provide access to higher education for as many students as possible, should be a priority. “Therefore, Monday morning we contacted the Department of Education to ask that our application for relief funds ... be rescinded.”

Because half of the funds were to be used for grants for students, school officials sought to reassure students they are fully committed to the financial aid that had been promised.

Stanford’s endowment was $27.7 billion at the end of the 2019 fiscal year.

Congress required that taxpayer-funded emergency relief be given to all colleges and universities, “no matter their wealth,” DeVos said in a written statement Wednesday. “But as I’ve said all along, wealthy institutions that do not primarily serve low-income students do not need or deserve additional taxpayer funds. This is common sense.

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

There is no assurance from the Education Department that the money wealthy universities forgo will be redistributed to schools with the greatest need. The department did not immediately respond to requests for comment.

Some higher education experts questioned Stanford’s decision and whether elite schools could have chosen a different way to lend a hand to needier institutions.

“If they think they don’t need it, they should take the federal funds and make an equivalent donation to a lower-resourced partner institution,” said Ben Miller, vice president for postsecondary education at the Center for American Progress, a liberal think tank. “If they gave it to a community college that would be more equitable than rerouting it through the formula.”

Sen. Josh Hawley (R-Mo.) vowed on social media Wednesday to introduce legislation barring the Education Department from giving federal relief funds “to universities with massive endowments UNLESS and UNTIL those universities actually spend some of those endowments to help their students and cover costs of this emergency.”

The legislation he introduced would require universities with endowments greater than $10 billion to spend 10 times the amount they were eligible to receive in federal funds on emergency coronavirus-related grants to students.

“I’m tired of hearing from university execs that ‘it wouldn’t be prudent’ to tap their endowments in this crisis,” Hawley wrote on Twitter. “Fine. But don’t come begging federal taxpayers for money while you sit on billions in endowment funds and students suffer.”

But wealthy schools do tap their endowments to fund student aid, in numbers that dwarf the federal stimulus money. At Princeton, for instance, money generated by the school’s $26 billion endowment helped pay for $320 million in student aid last year. The university expects to spend more next year because of the impact of the virus, a spokesman said.

At Tuesday’s White House coronavirus task force press briefing, Treasury Secretary Steven Mnuchin was discussing the U.S. Small Business Administration’s Paycheck Protection Program helping businesses that are struggling financially during the pandemic. Trump interrupted to say that he was going to request that Harvard pay back the money because of the size of the university’s endowment. “They shouldn’t be taking it,” he said.

Trump tweeted about the issue Tuesday evening, as well:

Harvard officials quickly responded, making clear Tuesday evening that they had not requested or received funds through the Paycheck Protection Program, which is designed to help small businesses. The university did receive stimulus money designed to help colleges and universities, and said all of it would be used to help students facing urgent financial needs.

Those comments sparked a volley of outraged responses online, with many calling on the university to reject the federal aid. On Wednesday afternoon, Harvard spokesman Jonathan Swain said in a written statement that like most colleges and universities, Harvard has been allocated money through the relief fund but that the school did not apply for the support, nor has it requested, received or accessed these funds.” The university has said the university, like others, will face significant financial challenges in the face of the economic crisis caused by the pandemic, he said.

“We are also concerned, however, that the intense focus by politicians and others on Harvard in connection with this program may undermine participation in a relief effort that Congress created and the President signed into law for the purpose of helping students and institutions whose financial challenges in the coming months may be most severe,” Swain said.

As a result of that — and the evolving guidance around the fund — Harvard decided “not to seek or accept the funds allocated to it by statute. We will inform the Department of Education of our decision and encourage the department to act swiftly to reallocate resources previously allocated to Harvard.”

Harvard’s endowment stood at $40.9 billion at its most recent reporting, for the fiscal year that ended in June. About 80 percent of those funds are restricted, and the value of the endowment has likely taken a hit as the pandemic has rocked the global markets.

Last week, Harvard said it would cancel discretionary spending, forgo new hires, delay some projects and reduce the salary of its executive leadership by 25 percent in response to the financial impact of the pandemic.

Other wealthy universities have announced similar plans, including Stanford. Both the provost and the president have taken 20 percent pay cuts, and said the university anticipates a $200 million shortfall amid decreased revenue, increased costs and new expenditures related to the pandemic.