Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — President Donald Trump on Friday signed the $2 trillion coronavirus economic stimulus bill, putting in motion desperately needed financial relief for millions of Americans set back by the pandemic.

Trump signed the bill just hours after the House passed it in a bipartisan vote.

"I want to thank Democrats and Republicans for coming together and putting America first," Trump said.

"We got hit by the invisible enemy and we got hit hard," he added. "I think we are going to have a tremendous rebound."

The legislation, which passed unanimously in the Senate on Wednesday, will provide billions of dollars in relief for struggling industries, a significant boost to unemployment insurance and direct cash payments to Americans, many of whom have been financially devastated by the outbreak.

Before signing the bill, Trump marveled at the size of it.

"I never signed anything with a 'T' on it," he said.

The more than $2 trillion bill is the largest economic relief package in modern U.S. history.

He also teased an upcoming announcement about deals for companies to make more ventilators, personal personal protective equipment and masks, which have all been in short supply.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

At the White House signing ceremony, Trump was flanked by Vice President Mike Pence, Senate Majority Leader Mitch McConnell, R-Ky., House Minority Leader Kevin McCarthy, R-Calif., as well as several members of his Cabinet.

House Speaker Nancy Pelosi, D-Calif., who helped negotiate the bill, was not invited to the signing ceremony, her spokesperson, Drew Hammill, told NBC News.

Earlier, ahead of the vote, Pelosi told reporters:"No bill is perfect, but we want to make sure that it at least comes part of the way to being sufficient. We do know that we must do more."

Follow along here for live updates on the Coronavirus Pandemic.

The House vote Friday came after Democratic and Republican leaders late Thursday summoned House members to Washington because they feared the package wouldn't be able to pass by voice vote, causing lawmakers to scramble back to the capital from their districts.

House leaders wanted to avoid bringing members back to Washington because of the coronavirus outbreak, so they had planned to hold a voice vote that could be done without lawmakers returning. There was speculation, however, that Rep. Thomas Massie, R-Ky., might demand a roll-call vote.

Those suspicions proved right: Shortly before the vote, Massie said in a series of tweets that he would try to force a roll-call vote on the legislation, arguing that House members should have to go on the record.

(1/11)I swore an oath to uphold the constitution, and I take that oath seriously.



In a few moments I will request a vote on the CARES Act which means members of Congress will vote on it by pushing “yes” or “no” or “present.” — Thomas Massie (@RepThomasMassie) March 27, 2020

"Is it too much to ask that the House do its job, just like the Senate did?" he tweeted.

Ultimately, House leaders were able to thwart the request for a recorded vote from Massie, who lacked support for the move from other members, and passed the bill in a voice vote. The maneuver, however, required a quorum of the House to be on the floor, angering many members who would have preferred not to be in close contact with their colleagues or with travelers on the way to and from Washington.

The bill's passage came after an emotional three-hour debate on the House floor in which members of both parties largely voiced support for the measure despite some misgivings.

Rep. Liz Cheney, R-Wyo., urged the House to pass the measure, saying, "We have an obligation to understand and to recognize that that this is not partisan. We need to come together as Americans to do what's right to defeat the virus, which I know we can, and also to restore our economy."

At one point, freshman Rep. Haley Stevens, D-Mich., wearing pink disposable gloves, went over her allotted time and began shouting, refusing to yield the floor when the presiding officer banged his gavel repeatedly. She could be heard shouting, “Our society needs you to stand together at this time, our country loves you. To our doctors and our nurses, I am wearing these latex gloves to tell every American to not be afraid!”

More than a dozen members have self-quarantined because of contact with those infected with COVID-19, and two members have tested positive for the illness. Public health officials have also said anyone traveling from New York should quarantine for 14 days, an issue for many members of Congress.

The measure increases unemployment payments and extends the benefit to those who typically do not qualify, such as gig economy workers, furloughed employees and freelancers. The bill increases the maximum unemployment benefit that a state gives to a person by $600 per week for four months.

The bill also provides for direct payments to Americans, giving individuals who make up to $75,000 a year checks for $1,200, couples making up to $150,000 payments of $2,400, and an additional $500 per child. The payments decrease for those making more than $75,000, with an income cap of $99,000 per individual or $198,000 for couples.

The legislation also provides $100 billion to hospitals; $350 billion to small businesses; $500 billion to corporations, including airline companies and cruise lines; and about $150 billion for state and local stimulus funds.