Struggling U.S. airlines will be eligible to receive federal loans and, if they are willing to give the government an option for an ownership stake, direct cash assistance under the coronavirus rescue deal reached by lawmakers and the White House.

The bill includes a $62 billion lifeline for struggling U.S. airlines, cargo carriers and contractors, with about half in loans and half in grants to make payroll, according to a draft version circulating to lawmakers Wednesday morning obtained by Bloomberg News.

Treasury Secretary Steven Mnuchin would be empowered to require equity or other securities in return for the cash assistance to keep workers on the job, and other restrictions would apply, including a limitation on reducing payrolls and on executive pay, according to draft text.

Passenger carriers would get up to $25 billion in grants and cargo haulers $4 billion, with a like amount of loans. Airline contractors providing ground staff such as caterers would be eligible for $3 billion in both grants and loans as well.

The shift from all loans to a significant amount of cash grants to airlines—even with strings attached—was a major victory for the industry that had argued for days that its very existence was at risk without such aid. Airlines for America, a lobby group for the largest U.S. carriers, said on Saturday that the industry would be forced to furlough workers unless lawmakers provided at least $29 billion in grants to prop up passenger and cargo carrier payrolls. The group didn’t have an immediate comment early Wednesday afternoon.

The industry lobbying blitz came amid plummeting U.S. air travel, with only 279,000 people flying within the U.S. on Tuesday, an 87% drop from the 2.2 million who did so on the same day in 2019, according to the Transportation Security Administration.

Mnuchin would have the discretion to allocate the $25 billion cash assistance to airlines, and determine whether government-held options or other equity instruments are needed to compensate taxpayers, Senator Pat Toomey said on a conference call with reporters on Wednesday. He said it would most likely be options and that if the government takes a common stock position, it would not retain voting rights.

The airline rescue blends key elements of rival plans proposed over the past week by Senate Republicans and House Democrats. The GOP-backed plan released last week would have provided passenger airlines with $50 billion in loans but no grants, while the bill released by House Democrats would have provided the sector with tens of billions in grants.

Multiple unions representing everyone from highly compensated cockpit crews to low-wage airport wheel chair attendants had pressed lawmakers for the grants.

Toomey said he preferred helping airlines through low-interest, long-term loans but said others viewed that as insufficient, he said.

“My concern is that given the market capitalization of this industry there’s not enough equity there to create a commensurate return, so I would’ve preferred long term low interest-rate loans,” he told reporters.

Airports would get $10 billion in grants to handle costs from the virus.

The deal also includes $17 billion in loans earmarked for companies deemed critical to national security, which is intended at least in part to assist Boeing Co. though the legislation doesn’t mention the company by name, one of the people said. Toomey said that pool of funds is not exclusively for Boeing.

A Democratic attempt to require airlines to limit carbon emissions to receive aid has been dropped, said Toomey.

Other provisions in the aid package may present problems for airlines that have slashed flight schedules to cope with plunging travel demand, according to a report by Evercore ISI analyst Duane Pfennigwerth. One is a measure that would authorize U.S. Transportation Secretary Elaine Chao to require airlines accepting aid to maintain flights to any location they were servicing as of March 1 “to the extent reasonable and practicable,” according to the draft.

The types and size of equity ownership the government could take in carriers receiving payroll grants is “another big potential sticking point which needs to be defined,” Pfennigwerth said in the note.