Both candidates say that human-caused climate change is real and urgent, and that they would sharply diverge from President Bush’s course by proposing legislation requiring sharp cuts in greenhouse gas emissions by midcentury.

Such rare agreement has both industry and environmental groups expecting a big shift, no matter who is elected, on three fronts where the United States has been largely static for eight years: climate legislation, expansion of nonpolluting energy sources and leadership in global talks on fashioning a new climate treaty.

But quick progress could be held hostage to the financial crisis and the prospect of a worldwide recession. The economic turmoil could force the next president to delay legislation that imposes major new costs on struggling businesses or raises energy prices for consumers.

Mr. McCain, of Arizona, has repeatedly pointed to his longtime focus on global warming, including a fact-finding trip with other lawmakers to the thawing Arctic and his co-authorship, in 2003, of the first comprehensive legislation seeking mandatory limits on heat-trapping gases.

But in recent weeks he has taken heat from some environmental activists for statements on the stump implying that he might not seek mandatory emission cuts. His campaign has not said how the ailing economy would affect his climate agenda.

A high priority is helping revive the nuclear-power industry because nuclear plants produce no greenhouse gases, once built. Mr. McCain claims a byproduct of his nuclear push would be the creation of thousands of new jobs.

Mr. Obama, of Illinois, insists that his energy plan, which is largely framed around measures that could have climate benefits, would remain a top priority even in the face of economic troubles.

Rather than increasing joblessness, he says, his proposals to create federal programs to cut energy waste and to help Detroit retool and retrain to make fuel-sipping hybrids would create jobs.

A top environmental goal of both candidates is enactment of climate-change legislation centered on a “cap and trade” mechanism that sets a ceiling on emissions that declines over time. Businesses and institutions that cannot hit the targets must buy permits from those that achieve bigger cuts than required.

But the devil on such bills is in the many details. (A fight over such details also contributed to the death of a climate bill that the Senate debated earlier this year.)

The permits issued under Mr. Obama’s bill would be bought by businesses through an auction before they were traded. Mr. Obama says he would use $150 billion of the auction revenue over 10 years — a small amount of the total flow — to help improve nonpolluting vehicles, wind and solar power, technology for capturing emissions from power plants, and other energy technologies. The brunt of the funds, he says, would help reduce costs faced by industries and citizens affected by the transition to a low-carbon economy. Mr. McCain’s approach, according to his Web site, would distribute the permits initially at no cost, and move to auctioning “eventually.”

Some economists and environmentalists have criticized the distribution of free permits as a handout to industry, noting that the European Union — which initially set up its trading system that way — saw the prices for pollution permits collapse. At the same time, some European power companies made windfall profits from their permits and ultimately heat-trapping gas emissions increased.

Mr. McCain would also initially allow businesses to meet all their emission targets either directly or by buying a kind of credit, called an offset, generated by, say, a landowner who can prove fields or trees are sopping up a certain tonnage of carbon dioxide or a business that can prove an investment avoided emissions that would otherwise have happened. His Web site says the fraction of emission reductions allowed through offsets “would decline over time,” but offers no specifics. Calls and e-mail messages to the McCain campaign were not answered.

Environmentalists tend to prefer Mr. Obama’s approach, which many analysts say has less wiggle room and, in theory, sends a stronger message to companies that rely on fossil fuels to seek nonpolluting sources or reduce energy use.

Several representatives of industries said that, if forced, they would prefer the less aggressive targets and looser terms of Mr. McCain’s plan. But some appear to think they will not need to choose for a long while in any case, given the state of the global economy.

“Most industries are sort of keeping their powder dry at this point,” said Scott H. Segal, a lawyer and lobbyist at Bracewell & Giuliani who represents energy companies.

Without more details, it is not possible to estimate the costs of either candidate’s cap-and-trade plan, but economists generally agree that Mr. McCain’s would be less costly because of the offsets. But such offsets may also delay real decreases in greenhouse gas emissions.

Despite Mr. McCain’s early focus on climate change and the need for legislation, some environmental groups have sharply chided him lately, pointing to campaign statements seemingly softening his stance on firm caps on heat-trapping gases.

The League of Conservation Voters gave him the lowest possible score for his voting record in 2007 on subsidies or spending for renewable energy. Environmental bloggers derided his choice of running mate, Gov. Sarah Palin of Alaska, who has questioned whether global warming is caused by human activity and who elicits chants of “drill, baby, drill” on the stump for her support of oil drilling offshore and in the Arctic National Wildlife Refuge.

An error has occurred. Please try again later.

You are already subscribed to this email.

Mr. McCain and Mr. Obama also support ocean drilling and oppose drilling in the Arctic refuge.

Joseph Romm, a physicist who writes the ClimateProgress.org blog and is a senior fellow at the Center for American Progress, a nonprofit research group generally aligned with Democrats, said that Mr. McCain “has provided ample evidence in the last year or so that he is not serious about clean energy and he has increasingly walked away from the climate issue.”

Mr. Obama, after taking heat from some environmentalists for championing coal use as an Illinois state senator, has been hailed by environmental groups for sticking with a mandatory cap on emissions with steadily rising costs for permits bought by polluters.

Still, his advisers lately have emphasized that he might have to compromise to get bipartisan support for a climate bill, something he has said he wants. Strident opponents of climate legislation, echoing the views of industry figures, do not appear worried that a bill will come together any time soon, no matter who is in the White House.

“I believe the current financial difficulties,” said Senator James M. Inhofe, Republican of Oklahoma, “will only reinforce the public’s concerns about any climate bill that attempts to increase the costs of energy and jeopardizes jobs in the near term.”

Van Jones, an environmental activist from Oakland, Calif., and the author of “The Green Collar Economy,” has criticized Mr. McCain as the vanguard of a new movement with an environmental veneer but bad intentions.

“The climate deniers got chased out of town, but in their place you’ve got the rise of the Dirty Greens,” he said in a recent interview. These are “people saying ‘I’m for solar, wind, geothermal, but I’m also for tar sands, coastal drilling.’ ”

Over all, the hurdles facing legislation restricting gases released by burning coal and oil, which still underpin the economy, remain so daunting that many experts who favor capping emissions appear to be focusing on actions a president could take with a pen stroke.

Both candidates have said they would grant California a long-sought waiver under the Clean Air Act allowing that state to set its own limits on automobile emissions of carbon dioxide, the main human-generated greenhouse gas. The Bush administration turned down California’s request in January.

David D. Doniger, who directs climate policy at the Natural Resources Defense Council and worked in the Clinton administration on the issue, said this move would set in motion a wave of pent-up state actions following California’s lead, and the resulting bottom-up pressure could force Congress to pursue a climate bill.

The same upward push could result, he said, if the next president orders the Environmental Protection Agency to regulate carbon dioxide.

The Supreme Court, in a 5-to-4 ruling in 2007, rebuffed the Bush administration and said the Clean Air Act gave the agency the authority to restrict the gas.

If Mr. Obama is elected, such a move appears likely. Heather Zichal, policy director for energy, environment and agriculture for the Obama campaign, said he would reduce emissions through actions at the E.P.A. and other government agencies.

“While he strongly believes that Congressional action is needed,” Ms. Zichal said, “he is also committed to employing the considerable powers Congress has granted to the executive branch.”

Mr. McCain has not specified whether he would seek to regulate carbon dioxide as a pollutant.

Some environmental groups say the next president could attack the energy, economic and climate problems at once with a grand program to remake the electrical grid, greatly expand sources of nonpolluting power like wind turbines and solar arrays, and boost energy efficiency.

Mr. Obama and Mr. McCain have both picked up on that theme.

When addressing energy on the campaign trail, Mr. McCain and Ms. Palin have tended to focus on expanding supplies of fossil fuels even as they mention the need for solar panels, tapping geothermal energy and the like. They call this an “all of the above” strategy.

One of Mr. McCain’s main talking points on nonpolluting energy sources is a promise to build 45 new nuclear power plants by 2030.

Energy specialists say that is a difficult goal because of the high cost — one estimate is that each plant would cost $10 billion — and unresolved questions about where to store nuclear waste. Another issue is the lack of American expertise in building such plants after decades of opposition.

Mr. Obama has given muted support to nuclear power but has repeatedly said his prime goal is an ambitious, sustained push for efficiency and new climate-friendly technologies, like plug-in hybrid cars and improved solar panels. Among other steps, he would create a national project to cut energy waste with federal subsidies to insulate one million low-income homes a year.

He and Mr. McCain continue to mention “clean coal” in the context of climate change, even though teams of researchers have concluded that investments in large-scale tests of ways to capture and bury carbon dioxide from coal combustion would be required on a scale far beyond the federal spending either candidate is calling for.

A version of this article appears in print on , on Page A22 of the New York edition with the headline: On Global Warming, McCain and Obama Agree: Urgent Action Is Needed. Order Reprints|Today's Paper|Subscribe