The House overwhelmingly passed a $484 billion spending package Thursday as the unemployment crisis deepened, a stark illustration of how policymakers continue trying to rescue an unraveling economy amid growing despair.

The legislation, approved 388-5, would restart a small-business loan program that was swamped by demand and allocate more money for health-care providers and virus testing. The vote was historic, as many lawmakers wore masks on the House floor, some even speaking through face coverings as they delivered impassioned remarks.

Just hours earlier, the Labor Department announced that 4.4 million Americans sought unemployment benefits last week. More than 26 million people have filed jobless claims since the novel coronavirus knocked the U.S. economy off course last month, beginning an extraordinary economic tailspin.

The legislation will now go to President Trump for enactment following Senate passage this week. Lawmakers from both parties are already talking about pursuing more large spending bills to try to contain the pandemic’s economic fallout, but the measure Thursday could be the last one for at least several weeks as divisions emerge between the parties about how much more to do. Congress is not scheduled to return to Washington until May 4 at the earliest.

“We are all painfully aware that the American people are worried about their health, their jobs, the economy and what life will look like after the emergency subsides,” House Ways and Means Chairman Richard E. Neal (D-Mass.) said. “That’s why we fought to increase funding for the Paycheck Protection Program. ... But I want to be clear, this does not come close to addressing the staggering needs of the American family.”

Because the country’s economic problems continue to mount, the White House and Congress have had to continually revisit policies and bailout programs to expand government assistance for more people and businesses. Many companies are shuttered, and state leaders have begun an uneven process of trying to decide when to relax certain restrictions.

Congress has now committed almost $3 trillion in emergency spending to battling the economic fallout from the coronavirus, but there are fresh signs that policymakers are becoming more wary of the public backlash that has begun over some of their decisions.

The Treasury Department on Thursday issued guidance making it much harder for publicly traded companies to qualify for money that was supposed to go to small businesses, threatening penalties in some cases if firms don’t repay money they had already received. And the Federal Reserve announced that it would be disclosing the names of companies that receive funding from some of its assistance programs after complaints that the central bank wasn’t being transparent about where the taxpayer aid was going.

The legislation that passed Thursday was negotiated between the Trump administration and congressional leaders after the small-business Paycheck Protection Program — created as part of Congress’s $2 trillion economic stimulus package — ran out of money last week and stopped processing loans. The new measure includes $310 billion to replenish this program, $60 billion for a separate small-business emergency loan and grant program, $75 billion for hospitals and health-care providers, and $25 billion for a new coronavirus testing program.

The Trump administration had initially asked Congress to approve $250 billion to bolster the Paycheck Protection Program with no strings attached, but Democrats refused. They pushed for spending for hospitals and testing as well as changes to the small-business program itself to make sure more money goes to lesser-served communities and through smaller lenders.

The program has proved extremely popular but also controversial, in part because some large hotel and restaurant chains were able to access the money while many smaller firms were blocked out. Acknowledging these disparities, the Treasury Department on Thursday said Paycheck Protection Program loan recipients are expected to self-certify “in good faith” that they actually need the loan.

The agency said borrowers can’t have other options that wouldn’t be “significantly detrimental” to the business. The Small Business Administration retains the right to audit borrowers later.

The Senate passed the bill Tuesday with just a few lawmakers present. The House vote proceeded much differently, as Republicans insisted on a roll-call vote. To ensure safety and social distancing, House members were separated alphabetically into eight groups with different time slots for each so they could maintain their distance as they entered on one side of the chamber and exited on the other. That caused what would normally be a 15-minute vote to take well over an hour.

In late March the House approved the $2 trillion Cares Act on a voice vote with a bare majority present. But despite the concerns expressed by many lawmakers about returning to Washington in the midst of a pandemic, the vast majority of House members were present Thursday, with only about 35 absent. Rep. Alexandria Ocasio-Cortez (D-N.Y.) bucked her party’s leaders and voted against the measure, saying Congress must be doing more to help her hard-hit district. A handful of conservative Republicans also voted “no,” with some raising concerns about the deficit. The only independent in the House, Rep. Justin Amash (Mich.), voted “present.”

The scene on the House floor during Thursday’s debate illustrated the pall the coronavirus has cast over the nation, where fatalities from the virus are approaching 50,000 and more than 850,000 cases have been reported. House officials and staff members along with many lawmakers of both parties wore masks or other face coverings, which some lawmakers removed only to deliver speeches on the floor. As lawmakers discussed the measure, Rep. Maxine Waters (D-Calif.) announced on the House floor that her sister was dying in St. Louis after recently contracting the virus.

The bill was the fourth economic rescue and stimulus bill Congress has passed in the past two months to deal with the ravages of the coronavirus, bringing the total federal commitment close to $3 trillion. Lawmakers have already begun to debate what next steps to take, with Democrats and Trump pushing for quick action on another giant rescue bill that would include funding for cities and states left out of the legislation being passed Thursday.

But Senate Majority Leader Mitch McConnell (R-Ky.) has expressed opposition to aiding states in such a way, telling a conservative radio host Wednesday that perhaps some states should have the option of falling into bankruptcy. This elicited fury from some governors and House Democrats on Thursday.

As the next bill was already being debated, Democrats and Republicans also spoke in favor of the one on the House floor Thursday, the Paycheck Protection Program and Health Care Enhancement Act.

“Refilling the Paycheck Protection Program account will help countless small businesses and employers across the country, including hundreds in my district,” Rep. Tom Cole (R-Okla.) said on the floor. “Frankly, refilling this important account could not come soon enough. It should have happened a week ago. But I’m fully supportive of this important bill.”

The Paycheck Protection Program is intended to help businesses with fewer than 500 employees keep workers on payroll by extending loans up to $10 million that can be forgiven if employers keep paying their workforce. Its rollout was rocky amid overwhelming demand, as some small businesses were unable to get loans even as some large businesses such as Ruth’s Chris Steakhouse obtained loans through big banks.

Nonetheless, multiple success stories emerged from community lenders that were able to use the program successfully and small businesses helped by the provisions. A Goldman Sachs survey of nearly 2,000 small businesses released Thursday found that 91 percent had applied for loans under the Paycheck Protection Program and about half of the those who were approved said the money would allow them to retain their entire workforce.

Before voting on the new spending bill Thursday, the House approved creation of a new select committee to investigate the administration’s coronavirus response and spending. The committee, which House Speaker Nancy Pelosi (D-Calif.) created but which required House approval, was bitterly opposed by Republicans who denounced it as an election-year attack against Trump that is unnecessary, given multiple congressional oversight committees and mechanisms already in place.

“Now this, now this, a select committee in an election year, the summer of an election year, to attack the president,” said Rep. Jim Jordan (R-Ohio).

Democrats said that given the amount of money being spent to address the pandemic, a select committee was in order despite other oversight mechanisms, including a new special inspector general, that were already included in the $2 trillion Cares Act in late March.

Creation of the panel, which will be chaired by House Majority Whip James E. Clyburn (D-S.C.), was approved on a party-line vote of 212-182, which like the spending bill vote also proceeded slowly with unusual distancing procedures in place.

Aaron Gregg contributed to this report.