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 to try to stop the planet from catastrophically overheating.

The agreement, which Senate Democrats hope to pass as early as next week, shocked even some who had been involved in the sputtering negotiations over climate legislation during the past year. The announcement of a deal, after many activists had given up hope, almost instantly reset the role of the United States in the global effort to fight climate change.

And it was delivered 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 this month that he could not support a climate bill because of inflation concerns.

The bill aims to tackle global warming by using billions of dollars in tax incentives to ramp up wind, solar, geothermal, battery and other clean energy industries over the next decade. Companies would receive financial incentives to keep open nuclear plants that might have closed, or to capture emissions from industrial facilities and bury them underground before they can warm the planet. Car buyers with incomes below a certain level would receive a $7,500 tax credit to purchase a new electric vehicle and $4,000 for a used one. Americans would receive rebates to install heat pumps and make their homes more energy-efficient.

“This is the action the American people have been waiting for,” President Biden said, hailing the bill’s “investments in our energy security for the future.”

Senate Democrats estimated that the legislation would enable the United States to cut greenhouse gas emissions to 40 percent below 2005 levels by 2030, putting the nation within striking distance of the aggressive climate goals laid out by Mr. Biden last year.

Mr. Biden wants to slash U.S. emissions to at least 50 percent below 2005 levels by the end of this decade, which is roughly the pace scientists say the whole world must follow to limit global warming to 1.5 degrees Celsius (2.7 degrees Fahrenheit) above preindustrial levels. That’s the threshold beyond which scientists say the likelihood of catastrophic floods, fires, storms and drought increases significantly. The planet has already warmed by about 1.1 degrees over the past century.

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,” said Jesse Jenkins of Princeton University, who modeled the effects of earlier versions of the legislation. “Without this bill, we’d be hopelessly far from our climate goals.”

Diplomats and climate experts said they hoped the deal would revitalize international efforts to tackle global warming, which have 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 are far from doing what they must to meet the target of 1.5 degrees, and leaders are scheduled to meet in Egypt in November to discuss stepping up their efforts.

“We all needed good news,” said Tina Stege, the climate envoy for the Marshall Islands, which is at risk of disappearing beneath rising seas. The announcement of a climate deal “puts much-needed wind in our sails,” she said, though she cautioned that “we remain far from where we need to be.”

Jonathan Pershing, who served as Mr. Biden’s deputy climate change envoy until January, said that in recent weeks he had fielded concerns from former counterparts from Africa and China who were acutely aware of the seeming collapse of U.S. climate legislation.

“They were like, ‘OK, you guys aren’t going to do this, so why should we do it,’” Mr. Pershing recalled. “I think you now have a fundamentally different narrative.”

Senator Edward J. Markey, Democrat of Massachusetts, said the legislation would restore American credibility in international negotiations. “You can’t preach temperance from a bar stool, and you can’t ask China, India, Brazil or other countries to cut emissions if we’re not doing it ourselves in a significant way,” he said.

“It is nothing short of an attack on the American family,” Senator John Barrasso, Republican of Wyoming, said in a statement. “If we want to reduce inflation, lower energy costs, and cut the deficit, the recipe is clear. Congress should cut spending and unleash American oil and natural gas production.”

The bill would affect nearly every aspect of U.S. energy production. It includes $30 billion in incentives for companies to build solar panels, wind turbines and batteries and to process critical minerals in the United States, aiming to reverse the longstanding migration of clean energy manufacturing to China and elsewhere.

Companies have said they are ready to respond quickly. QCells, a South Korean-based solar company that is already building a $171 million assembly factory in Dalton, Ga., is planning a multibillion-dollar expansion of supply chains in the United States if the bill passes, said Scott Moskowitz, QCells’ head of market strategy and public affairs.

Also included is $60 billion to address the disproportionate burden of pollution on low-income communities and communities of color; $27 billion for a “green bank” aimed at delivering financial support to clean energy projects; and $20 billion for programs to cut emissions in the agriculture sector.

The most immediate effect of the bill, energy experts said, will be to supercharge the growth of wind turbine, solar panel and electric vehicle production in the United States. Renewable energy production has slowed significantly this year, due to pandemic-related disruptions, trade disputes and uncertainty about federal policy, according to a recent report by the American Clean Power Association, which represents wind and solar energy companies and battery manufacturers.

“The entire clean energy industry just breathed an enormous sigh of relief,” said Heather Zichal, chief executive of the association. “This is an 11th-hour reprieve for climate action and clean energy jobs.”

For decades, the U.S. has provided tax credits for wind and solar power that expire after one to two years, subjecting the industry to a boom-bust cycle until the credits are renewed. Under the new legislation, the tax credits would last up to 10 years, to give companies the confidence to make long-term investment decisions.

The bill does not, however, address one of the biggest hurdles facing renewable energy: a lack of long-distance power lines to help bring wind and solar power to cities from far-flung rural regions. An earlier version of the bill had included tax credits for new transmission, but that was removed. Without that provision, many wind and solar projects could struggle to get built, said Rob Gramlich, founder of Grid Strategies.