Days of negotiations between the Trump administration and Congress—and fierce lobbying by industries eager for assistance dealing with the coronavirus outbreak—has yielded a rescue package worth more than $2 trillion in spending and tax breaks.

Here are some of the winners and losers:

More aid for companies, strings attached

The plan would include about $500 billion in loans and assistance for larger companies, as well as states and cities, according to the latest drafts being circulated. But the aid comes with strings attached after pressure from Democrats.

Companies receiving a government loan would be subject to a ban on stock buybacks through the term of the loan plus one additional year. They also would have to limit executive bonuses and take steps to protect workers. The Treasury Department would have to disclose the terms of loans or other aid, and a new Treasury inspector general would oversee the lending program.

The bill is largely a win for the retail, hotel and restaurant industries that initially viewed lawmakers as favoring the airline industry. Trade groups representing those sectors lobbied Congress hard for loans, grants and unemployment assistance because their businesses have also suffered coronavirus-related revenue losses.

“We see it as an important win,” said Austen Jensen of the Retail Industry Leaders Association. “Yes airlines are in a tough spot, but the retail industry is equally in a difficult position.”

Jensen said he hopes “necessary” oversight measures won’t delay “getting this capital out into the businesses.”

The details of the stimulus plan pushed the broader market to session highs, with the S&P 500 gaining as much as 5.1% before paring gains to close up 1.2%. The S&P Supercomposite Hotels Index, which includes cruise operators, also extended gains, as did restaurant and casinos stocks.

Airlines win loans, cash-for-equity bailouts

Struggling U.S. airlines would be eligible to receive federal loans and direct cash assistance if they are willing to give an option for an ownership stake to the government.

The program allocates $25 billion to passenger carriers and $3 billion to airline contractors providing ground staff such as caterers, while cargo haulers would see $4 billion.

The addition of direct cash relief—earmarked specifically for payrolls—was sought by airline and industry unions, which feared massive job losses if loans were the only option.

The S&P Supercomposite Airlines Index advanced further, rising as much as 17% on the day, before closing up 9.8%.

The legislation doesn’t include emissions limits for airplanes that were sought by House Democrats, Senator Pat Toomey, a Pennsylvania Republican, said on a press call.

Other transportation winners include rail and transit operators. Amtrak would get $1.02 billion to cover coronavirus-related revenue losses and support state-funded routes. State and local transit agencies would get $25 billion for operating and capital expenses.

Small businesses wanted cash injections

The bill carves out more than $350 billion in aid for small businesses, much of which would be in loans through the Small Business Administration and banks, guaranteed by the federal government. The loans would be forgiven provided the businesses meet certain requirements, including limiting reductions in pay and layoffs, though with more flexibility for employers than the original Senate bill.

Industry advocates previously said loans weren’t enough, especially for the smallest outfits, although some expressed more optimism on Wednesday. An instant cash injection is the only way to save them from failing, according to the Small Business Majority.

Cash for citizens, gig workers

The package would provide direct payments to lower- and middle-income Americans of $1,200 for each adult, as well as $500 for each child.

Democrats were able to secure a change from a previous version that allows low-income taxpayers to get the full $1,200 payment. The initial plan would have given smaller checks, or in some cases, no money at all, to very-low income people.

Unemployment insurance payments were boosted and recipients would be eligible to receive those funds for an average of four months, up from three in the prior GOP plan. It also would extend eligibility to the self-employed and workers in the gig economy such as drivers for Uber Technologies Inc.

Money for hospitals under health-care ‘Marshall Plan’

The legislation calls for $117 billion for hospitals and veterans’ health care, as well as $16 billion for personal protective equipment, ventilators and other medical supplies for federal and state response efforts. It also includes $11 billion for vaccines, therapeutics, diagnostics and other medical needs, and at least $250 million to improve the capacity of health-care facilities to respond to medical events, according to a summary by the Senate Appropriations Committee.

The bill would require insurers to cover tests for Covid-19. Labs would be required to post cash prices for the tests on public websites, and insurers would have to pay those prices or another privately negotiated rate. Any vaccines or other preventive services would have to be covered with no cost-sharing.

The measure would temporarily lift Medicare payment cuts and includes a 20% increase in Medicare payments to hospitals for treating Covid-19 patients.

The hospital industry supported the measure for providing emergency funds, boosting payments and suspending some funding cuts. But “more will need to be done to deal with the unprecedented challenge of this virus,” Rick Pollack, head of the American Hospital Association, said in a statement.

Mortgage relief for wide swath of borrowers

Many U.S. homeowners and businesses hit hard by coronavirus could get relief from making their monthly mortgage payments through the bill.

Borrowers with loans insured by government agencies such as the Federal Housing Administration and the Department of Veterans Affairs would be eligible for forbearance. Consumers whose mortgages are backed by Fannie Mae and Freddie Mac would also be eligible to skip payments.

U.S. regulators have already mandated forbearance to borrowers facing financial hardships due to coronavirus, in addition to suspending foreclosures and evictions through the end of April and in some cases longer.

Under the Senate bill, borrowers would be eligible for 60 days of forbearance if they can demonstrate virus-related financial stress. The relief can be extended for 30 days up to four times.

Mortgage servicers, who collect homeowners’ monthly payments, couldn’t demand documentation proving economic hardship. Instead, borrowers would just have to attest that they’re struggling, according to the text of the legislation.

Commercial borrowers with federally backed loans could potentially skip payments for at least 30 days with a possible extension of up to 60 additional days. Unlike individual consumers, businesses would have to document financial hardship and they would be barred from evicting tenants as long as they are missing mortgage payments.

Emergency aid for farmers included

The stimulus package includes up to $23.5 billion in farm aid. It would provide $9.5 billion in emergency funds for agriculture, including livestock producers and growers of specialty crops such as fruits and vegetables. And it would authorize $14 billion in new borrowing authority for the U.S. Agriculture Department’s Commodity Credit Corp., a Depression-era entity the Trump administration has used for its farm-bailout programs the past two years.

Agriculture groups including the American Farm Bureau Federation, the United Fresh Produce Association and livestock groups had sought aid in the stimulus package.

State and local governments get relief

A coronavirus relief fund with $150 billion would be created for states, cities and other local governments. Additional funds will be set aside for territories, tribal governments and other entitites.

The package includes $400 million for the Election Assistance Commission to provide grants in response to the coronavirus outbreak. The funds could be used to expand voting by mail, early voting and online registration and bolster in-person voting, according to a Senate aide. The bill doesn’t create a national requirement for voting by mail, which Republicans objected to.

No aid for Trump properties

Democrats won language that would bar any business owned by President Donald Trump or his family from getting loans from Treasury. Businesses owned by members of Congress, heads of executive departments and Vice President Mike Pence also would be blocked from receiving aid under the stimulus program.

Oil industry, renewables both lose

A $3 billion provision in the original GOP bill to buy oil for the nation’s Strategic Petroleum Reserve was cut by negotiators. The funding for the emergency stockpiles had been requested by the Trump administration for the purchase of up to 77 million barrels of crude oil to support the domestic industry and boost reserves at cheap prices.

Democrats sought to add billions in funding for clean energy in exchange and in the end both were scuttled. But the issue could arise as Congress takes up additional coronavirus-related legislation in coming weeks.

The omission of expanded tax incentives for renewable energy and spending on green infrastructure is a blow to advocates of solar, wind and electric vehicles who worry that a buildup of new federal debt from stimulus spending will discourage green investment and lending in the future.

The measure disappointed reneweable advocates, who are seeking more flexibility to claim existing credits as project timelines slip. Abigail Ross Hopper, head of the Solar Energy Industries Association, said that half of the industry’s jobs are at risk as a result of the pandemic.

Supporters of oil purchases said they still expected the acquisitions to take place. The Energy Department can use other agency funds and it can seek more money in future stimulus legislation.

Anne Bradbury, head of the American Exploration and Production Council that represents independent oil producers, said the group is “confident that DOE will be able to meet the president’s directive to purchase up to $3 billion in U.S.-produced crude.”