The Senate passed a $484 billion deal Tuesday to replenish a small-business loan program that’s been overrun by demand and to devote more money to hospitals and coronavirus testing. President Trump said he would sign it into law.

The legislation, which came together over days of intense negotiation that followed a bitter partisan standoff, would increase funding for the Paycheck Protection Program by $310 billion. It would also boost a separate small-business emergency grant and loan program by $60 billion, and direct $75 billion to hospitals and $25 billion to a new coronavirus testing program.

The House is expected to approve the measure Thursday.

The Paycheck Protection Program was designed to help firms with fewer than 500 workers, but a number of larger companies found ways to obtain the funds in the past two weeks, leading to bipartisan outrage. Treasury Secretary Steven Mnuchin said Tuesday that larger firms would now be blocked from using the program, and Trump called on some big companies that had already obtained taxpayer-backed loans to return the money.

The new legislation comes on top of a $2 trillion coronavirus rescue law that Congress passed late last month and increases the government commitment to fighting the pandemic to close to $3 trillion. That dwarfs by far any other federal intervention of its kind and underscores the depth of the economic blight befalling the nation and the scramble by policymakers to respond.

Democratic lawmakers say it should be just the beginning. Speaking on the Senate floor shortly before the legislation passed by voice vote, Senate Minority Leader Charles E. Schumer (D-N.Y.) said lawmakers needed to quickly begin work on another piece of legislation that would match the size and scope of last month’s $2 trillion Cares Act.

“I’d remind my colleagues this is an interim measure,” Schumer said. “There’s plenty of hard-won provisions that we Democrats are pleased with, but it’s ultimately a building block. In the weeks ahead Congress must prepare another major bill similar in size and ambition to the Cares Act. The next bill must be big and bold and suited to the needs of a beleaguered nation.”

Senate Majority Leader Mitch McConnell (R-Ky.) disagreed. In an interview with The Washington Post after Tuesday’s vote, he said it was time to “push the pause button” on additional spending legislation, at least until lawmakers are able to return to the Capitol in person. That’s scheduled to happen May 4.

McConnell said that the impact on the deficit and debt is becoming a concern and that the best stimulus is for the economy to start functioning again. He said he was pleased that was gradually starting to happen.

“Waving $2.7 trillion through the Senate and the House on voice votes is not the way the Congress was set up to function,” McConnell said. “And since I believe we’re in the process of beginning to get back to normal, with proper safeguards when we go out, we ought to deal with this the way Congress normally would, with full attendance in the Capitol, doing our work.”

McConnell declined to offer an estimate of how much money Congress might ultimately have to devote to fighting the pandemic.

The focus of the new bill was renewing the Paycheck Protection Program. The Cares Act created the $349 billion forgivable-loan program, which was designed to incentivize small businesses to keep workers on payroll. The White House said the initiative ran out of money last week amid overwhelming demand as the economy cratered and millions were laid off.

Two weeks ago, the White House asked Congress for $251 billion to replenish the fund, but Democrats refused without their demands being met, finally resulting in the deal that was finalized Tuesday just hours before it passed the Senate.

Democrats fought successfully for money in the bill for hospitals and testing, but they did not get Republicans and Trump administration officials to go along with their demand for $150 billion for cities and states. Schumer said he hopes to see that addressed in the next package, and Trump has indicated he is open to it.

But there are already signs that the $310 billion set aside for the Paycheck Protection Program still might not be enough to meet surging demand for the loans.

PNC Bank has told customers that there might not be enough capacity in the program to fund all loan requests, and it said any changes dictated by the White House or Congress could complicate matters further.

“Unfortunately, with the significant volume of applications already submitted to PNC and other lenders, it is likely that not every qualified applicant will receive loan proceeds under the PPP even if Congress authorizes additional funding,” PNC wrote on its website.

Schumer said that he, Mnuchin, House Speaker Nancy Pelosi (D-Calif.) and White House Chief of Staff Mark Meadows were on the phone “well past midnight” to finalize the deal and that “we came to an agreement on just about every issue.”

The deal had been on the verge of completion for several days, but Democrats and Trump administration officials had been wrangling over final details, including the design of the new $25 billion coronavirus testing program. Democrats were pushing for a national approach as Republicans sought more flexibility for states.

The final agreement seems to strike a balance, requiring plans from states and localities for how they will use the testing funds, and mandating a strategic plan on providing assistance to states for increasing testing and testing capacity.

Speaking on the Senate floor, Schumer and McConnell described the new testing regime in diametrically opposed language, even as they both praised its creation. McConnell emphasized a leading role for states, while Schumer described it as a national program.

The Paycheck Protection Program allows companies with fewer than 500 employees to obtain loans from banks to mostly cover payroll costs. If the firms retain employees and meet other requirements, the loans will be forgiven, paid off by taxpayers.

There has been a surge in applications for these loans, and the first $349 billion was disbursed in less than two weeks as 1.6 million companies secured funding. But many other businesses were unable to obtain loans, and the White House and congressional Republicans faced pressure to refine the program after it became known that some larger hotel and restaurant chains were able to tap into it.

Of the new money designated for the Paycheck Protection Program, $60 billion would be reserved for lending by small and medium-sized financial institutions. Other provisions would require participation by lending institutions serving minority or underserved areas, such as community development financial institutions and minority depository institutions, language sought by the Congressional Hispanic Caucus and others. An additional $11 billion is included for administrative costs, meaning the total PPP spending in the bill is $321 billion.

The deal also includes $60 billion in emergency loans and grants for a separate Small Business Administration program that is also out of money and would allow agricultural companies to qualify for these funds, a provision sought by some GOP senators.

If the agreement becomes law, it will be the fourth coronavirus-related bill enacted in the past two months. Lawmakers have scrambled to deal with the economic wreckage caused by the pandemic, which has led more than 22 million Americans to file for unemployment benefits and many businesses to close.

Despite McConnell’s desire to pause action for now, lawmakers and the Trump administration are already discussing what could be in the next package. In addition to money for cities and states, Trump said on Twitter on Tuesday that he wants the next bill to include “much needed Infrastructure Investments for Bridges, Tunnels, Broadband, Tax Incentives for Restaurants, Entertainment, Sports, and Payroll Tax Cuts to increase Economic Growth.”

The $25 billion for testing and contact tracing in the legislation that passed the Senate on Tuesday includes $11 billion for states, $1 billion for the Centers for Disease Control and Prevention, $1.8 billion for the National Institutes of Health, $1 billion for the Biomedical Advanced Research and Development Authority, $1 billion for testing the uninsured, $22 million for the Food and Drug Administration, and $825 million for community health centers, rural health centers and others.

Jeff Stein contributed to this report.