WASHINGTON — President Trump signed a roughly $2 trillion stimulus package into law on Friday, hours after House lawmakers hustled back to the Capitol to pass the aggressive response to the coronavirus pandemic that has staggered the U.S. economy.

Read now:Will you get a $1,200 check from the $2 trillion stimulus bill? Depends on how much money you make

Plus:What the $2 trillion stimulus means for you — and how the ‘recovery rebates’ to households will be calculated

The bill is the largest relief package in U.S. history and extends aid to many struggling Americans through direct payments and expanded unemployment insurance. The package provides loans and grants to businesses, augments drained state coffers and sends additional resources to sapped health-care providers.

“ ‘I never signed anything with a T on it.’ ” — President Trump, at a signing ceremony for the bipartisan stimulus bill on Friday

“I want to thank Democrats and Republicans for coming together and putting America first,” Trump said in remarks Friday in the Oval Office. He added, in a nod to the size of the package: “I never signed anything with a T on it.”

Trump has told people he wants his signature to appear on the direct payment checks that will go out to many Americans in the coming weeks, according to an administration official. The White House didn’t comment.

Normally, a civil servant — the disbursing officer for the payment center — would sign federal checks, said Don Hammond, a former senior Treasury Department official.

Senate Minority Leader Trent Lott and House Speaker Dennis Hastert, both Republicans, hold up President George W. Bush’s rebate checks in August 2001. The Bush administration mailed out stimulus checks in 2008 as well as 2001. AFP/Getty Images

The measure passed the Senate 96-0 earlier in the week and had overwhelming support in the House as well. But it needed to clear one last hurdle on Friday after Rep. Thomas Massie (R., Ky.) tried to force a recorded vote, arguing it would be irresponsible to use a voice vote on such a large bill.

An expanded version of this report appears at WSJ.com.

Coronavirus update:615,519 diagnosed cases and 28,717 deaths; in U.S., 104,860 and 1,711

Read on:How Americans are coping with sudden job losses amid coronavirus pandemic

Trending at WSJ.com:

Why Dr. Fauci finds himself at the center of coronavirus controversy

Italy’s slow-moving battle against COVID-19 is a warning to the U.S. and others