President Trump on Friday signed a nearly half-trillion-dollar coronavirus relief bill that replenishes money for small-business loans to prevent layoffs.

The $484 billion bill is the fourth large coronavirus deal and revives the Small Business Administration’s Paycheck Protection Program, which ran out of funds last week.

The bill also has $75 billion for hospitals and $25 billion for COVID-19 testing.

Trump hailed the bill as “great for small businesses, great for the workers” and said it would “extend relief to thousands of African American and Hispanic American business owners.”

House Minority Whip Steve Scalise (R-La.), who attended the Oval Office signing ceremony, predicted that the legislation would spare 30 million people from being unemployed, according to a pool report.

The package passed the House 388-5 on Thursday after passing the Senate unanimously on Tuesday, though Sen. Rand Paul (R-Ky.) said he opposed it.

The small-business program forgives loans if businesses with up to 500 employees, and in some cases more, don’t lay off workers. An initial $350 billion passed last month as part of a more than $2 trillion stimulus bill but ran out in two weeks.

The program receives an additional $310 billion in the new bill. The deal includes a $60 billion small-business loan set-aside for smaller banks and credit unions.

Another $50 billion goes to the SBA’s Economic Injury Disaster Loan program and $10 billion to the SBA’s Emergency Economic Injury Grant program.

Since last month, 26 million Americans — or about 16 percent of all workers — lost their jobs due to the coronavirus pandemic and government-ordered business closures.

New York Rep. Alexandria Ocasio-Cortez was the only Democrat who voted against the bill, saying she was frustrated it didn’t go further, especially to stop small-business loans from going to large companies.

“It is a joke when Republicans say that they have urgency around this bill,” the self-described socialist said. “The only folks that they have urgency around are folks like Ruth’s Chris Steak House and Shake Shack. Those are the people getting assistance in this bill. You are not trying to fix this bill for mom-and-pops, and we have to fight to fund hospitals [and] to fund testing.”

Both Ruth’s Chris and Shake Shack have said they are returning the funds they received.

AOC added: “If you had urgency, you would legislate like rent was due on May 1 and make sure that we have rent and mortgage relief for our constituents.”

Four fiscally conservative Republicans also opposed the bill and libertarian Rep. Justin Amash (I-Mich.) voted “present.”