The $369 billion climate and tax package forged in a surprise deal by Senate Democrats on Wednesday would be the most ambitious action ever taken by the United States.

The agreement, which Senate Democrats hope to pass as early as next week, shocked even those who had been involved in the negotiations. After many activists gave up hope, the announcement of a deal reset the role of the United States in the global effort to fight climate change.

The delivery was made by Senator Joe Manchin III of West Virginia, the holdout Democrat who had been reviled by environmentalists and some of his own colleagues after he said he could not support a climate bill because of inflation concerns.

The legislation will be the greatest pro-climate legislation that has ever been passed by Congress according to Senator Chuck Schumer.

Billions of dollars in tax incentives will be used to ramp up clean energy industries over the next decade. Financial incentives would be given to companies to keep open nuclear plants or to capture emissions from industrial facilities before they can warm the planet. The tax credit is available to car buyers with incomes below a certain level. Americans would receive money to make their homes more energy efficient.

President Biden said the bill was the action the American people had been waiting for.

The legislation would allow the US to cut greenhouse gas emissions to 40 percent below 2005 levels by the year 2030.

Mr. Biden wants to cut U.S. emissions by half by the end of this decade, which is roughly the pace scientists say the world must follow to limit global warming to 1.5 degrees Celsius. Scientists say the likelihood of catastrophic floods, fires, storms and the like increases significantly if you go past that threshold. Over the past 100 years, the planet has warmed by 1.1 degrees.

The bill keeps us in the climate fight and makes it possible that executive action, state and local government policies, and private sector leadership can get us across the finish line, according to JesseJenkins. We would be far from our climate goals without this bill.

Climate experts and diplomats hope the deal will help revive international efforts to tackle global warming, which has been flagged in recent months as the war in Ukraine and surging oil prices have led many countries to focus on shoring up fossil fuel supplies. The world's governments aren't doing enough to meet the target of 1.5 degrees, and leaders are going to meet in Egypt in November to discuss stepping up their efforts

Tina Stege, the climate envoy for the Marshall Islands, said that everyone needed good news. She cautioned that we remain far from where we need to be despite the announcement of a climate deal.

Former counterparts from Africa and China were concerned about the collapse of U.S. climate legislation, according to Jonathan Pershing, who was Mr. Biden's deputy climate change envoy.

Mr. Pershing said that they decided not to do it because they weren't going to do it. I think you have a completely different story to tell.

The legislation was said to restore American credibility in international negotiations. If we aren't doing it ourselves in a significant way, we can't ask China, India, Brazil or other countries to cut emissions

Senate Republicans are against it.

Senator John Barrasso said that it was an attack on the American family. The recipe for reducing inflation, lowering energy costs, and cutting the deficit is clear. Spending should be slashed and American oil and natural gas production should be increased.

Making solar panels at a plant in Perrysburg, Ohio. Credit...Megan Jelinger/Reuters

The bill would affect a lot of things. It includes $30 billion in incentives for companies to build solar panels, wind turbines and batteries in order to reverse the longstanding migration of clean energy manufacturing to China and other countries.

Companies say they are prepared to respond quickly. QCells, a South Korean-based solar company that is already building a $171 million assembly factory in Georgia, is planning a billion dollar expansion of supply chains in the US if the bill passes, according to Scott Moskowitz, QCells' head of market strategy.

There is $60 billion to address the disproportionate burden of pollution on low-income communities and communities of color, $27 billion for a green bank, and $20 billion for programs to cut emissions in the agriculture sector.

According to energy experts, the bill will increase the growth of wind turbine, solar panel and electric vehicle production in the US. According to a recent report by the American Clean Power Association, which represents wind and solar energy companies and battery manufacturers, renewable energy production has slowed due to trade disputes and uncertainty about federal policies.

Heather Zichal, chief executive of the association, said that the clean energy industry breathed a sigh of relief. It is an 11th-hour reprieve for climate action.

For decades, the U.S. has provided tax credits for wind and solar power that are not renewed after a couple of years. The tax credits would last up to 10 years to give companies the confidence to make long term investment decisions.

One of the biggest hurdles facing renewable energy is a lack of long-distance power lines. Tax credits for new transmission were removed from the previous version of the bill. Rob Gramlich said that without that provision, many wind and solar projects could not be built.

The tax incentives in the bill are expected to nurture emerging technologies like carbon capture for industrial facilities and the use of hydrogen as a low-carbon fuel. Many of these technologies are too costly for widespread use today, but the hope is that by creating a market for an initial round of projects, costs could be lowered.

The bill provides some support for fossil fuels in order to get Mr. Manchin's support. Environmental groups had opposed the bill because it mandated new lease sales for oil drilling in the Gulf of Mexico, something Mr. Biden had promised to stop if he were elected president.

Mr. Manchin said that the bill doesn't shut off fossil fuels. The package is a realistic energy and climate policy.

As part of the agreement, Mr. Manchin said he had secured a commitment from both Mr. Biden and Speaker Nancy Pelosi that Congress would approve a separate measure to address the permitting of energy infrastructure.

The Mountain Valley Pipeline under construction in Virginia in 2019. Senator Joe Manchin III has taken a strong interest in the project.Credit...Charles Mostoller/Reuters

The Mountain Valley Pipeline is a project that Mr. Manchin is interested in.

Even with the concessions to the fossil-fuel industry, the bill is still worth it for climate change, according to a professor of environmental policy at the University of Santa Barbara.

A small group of lawmakers continued to work with Mr. Manchin after Mr. Biden wrote an obituary for climate legislation. The lines of communication were kept open by Senator John Hickenlooper of Colorado.

"When a lot of people said 'That's the end' and everyone was writing it off, I went to everybody I knew and said, 'Wait a minute, we can't quit'" We don't have a good alternative.

They didn't want to have their heart broken again, so they were reluctant to continue negotiations. He said that Mr. Manchin remained open to a deal.

According to Mr. Hickenlooper, the group worked closely with experts at the Wharton School of Business at the University of Pennsylvania and that Mr. Manchin put a lot of stock in their data indicating that legislation could be designed that didn't make inflation worse.

He said Mr. Manchin was an honest broker who wanted to find a way to address climate change without burdening fossil fuel workers.

Mr. Hickenlooper said he was at the table if Joe Manchin was at it.