An earlier version of this article inaccurately described the expected recipients of direct deposits under the fiscal stimulus package. The error has been corrected.

Senior lawmakers and members of the Trump administration early Wednesday came to an agreement on a $2 trillion stimulus measure to try to keep Americans whole as the economy shuts down due to the coronavirus.

“Ladies and gentlemen, we are done. We have a deal,” White House aide Eric Ueland announced at the Capitol just after midnight.

Negotiators worked all day, with Treasury Secretary Steven Mnuchin and incoming White House chief of staff Mark Meadows shuttling between meetings with Republicans and Democrats.

The package includes direct deposits for many Americans, $367 billion for loans to small businesses and an unprecedented program that will allocate $500 billion to the Treasury Department. Some of that money will be used to guarantee a Federal Reserve loan program for small and midsize businesses. Larry Kudlow, director of the White House’s National Economic Council, said the funds could be leveraged into $4 trillion in lending through the Fed.

Senate Majority Leader Mitch McConnell pledged the Senate would pass the measure on Wednesday. Speaker of the House Nancy Pelosi said the House could pass the bill quickly, by unanimous consent.

“This bipartisan legislation takes us a long way down the road in meeting the needs of the American people,” Pelosi said in a statement Wednesday morning. She said House Democrats will now review the text of the agreement and “determine a course of action.”

Adults making up to $75,000 would receive direct payments of $1,200, while children would see $500 checks. Hospitals would receive some $150 billion under the deal, and small businesses would get $367 billion in aid.

The deal came as President Donald Trump freshly warned of the impact on U.S. economy from the coronavirus, and said he sought to have the country “opened up” by Easter, which falls on April 12. Economic activity has wound down dramatically across the nation as governors have ordered steps like mandatory closures of nonessential businesses. Governors, meanwhile, have pushed back on Trump’s timeline as new coronavirus cases continue to rise.

Mnuchin would be able to allocate some of the funds to companies damaged by the shutdown of the economy.

He agreed to Democratic demands for more transparency. The negotiators agreed to a five-person panel to oversee the lending and an independent inspector general.

The measure also includes a major boost to unemployment insurance, allowing workers who are furloughed but not laid off to be paid their regular salaries for up to four months.

The measure includes $367 billion in loans for small businesses. If the companies don’t make any changes to payroll, these loans will be forgiven.

Under unanimous consent, there is a risk that any House lawmaker could object, which could lead to the need for a regular roll-call vote. House members are now scattered across the country on a recess. That all members would travel back to Washington to cast their votes seems hard to fathom.