Both Hillary Clinton and Donald Trump want the United States to become a global energy superpower.

The similarity in their energy policies ends there.

The two major-party presidential candidates have staked out nearly opposite positions — Trump’s based on fossil fuels, Clinton’s on renewable power.

Trump vows to expand drilling for oil and natural gas, both onshore and off. He wants to end America’s dependence on OPEC and rescue the failing coal industry, which he says has been strangled by President Obama. His stances largely match the energy priorities pushed by the Republican Party for the last eight years.

Democrat Clinton, meanwhile, pledges to turn the United States into the world’s “clean energy superpower,” installing 500 million solar panels nationwide during her first term. She wants to kill subsidies to oil and gas companies, cut America’s use of petroleum by one third and upgrade the electric grid to handle more wind, solar and geothermal power.

Driving the difference is climate change.

Clinton, like Obama, considers global warming a grave threat that needs to be confronted now. Trump has labeled climate change a “hoax” and “bull—,” at one point suggesting that the idea had been cooked up by China to undermine American manufacturers. He later called the China comment a joke.

Although Trump has recently softened his stance, telling an interviewer in August that “there could be some impact” from warming, he has pledged to back out of last year’s international climate accord signed in Paris and scuttle Obama’s Clean Power Plan.

Clinton, in contrast, would uphold both the Paris accord and the Clean Power Plan. She aims to cut America’s greenhouse gas emissions 30 percent below 2005’s levels by 2025. Her long-term goal is far more ambitious — an 80 percent reduction by 2050, the same target California uses in its climate plans.

“Focusing on zero-carbon energy is tremendously important right now, and Clinton is focusing on it, and Trump isn’t,” said UC Berkeley energy economist Severin Borenstein.

Their positions reflect the polarization of American climate politics during Obama’s two terms.

While most Democratic and independent voters agree that human activity is warming the globe — the conclusion of the vast majority of climate scientists — only 38 percent of Republican voters do, according to a Gallup poll in March. Long gone are the days when Obama and his 2008 Republican opponent for the White House, John McCain, agreed on the dangers of global warming and pitched many of the same policies to deal with it.

“Hillary Clinton feels climate change is a major concern, so she has major efforts to address it,” said Paul Knappenberger, a researcher with the Cato Institute libertarian think tank who argues that the effects of global warming will not be as severe as many fear. “Donald Trump does not share her concern. He wants to level the playing field and let the best or cheapest energy source win out.”

True to her policy-wonk reputation, Clinton has offered more energy proposals in detail than has Trump, from building more renewable power projects on public lands to pumping federal funding into research on energy storage and other carbon-free technologies.

Trump has touted a few specific steps he would take, such as bringing back the Keystone XL pipeline extension that Obama killed, a project that would have shipped crude from Canada’s vast oil sands to Gulf Coast refineries.

But Trump has largely stuck with broader proposals.

He has called for America to ramp up oil and gas production, particularly on public lands, using the money to improve roads, schools and public infrastructure.

“This is your treasure, and you — the American people — are entitled to share in the riches,” Trump said during a May speech in North Dakota on energy issues.

He has called for removing bureaucratic barriers to all forms of energy production — including renewables — arguing that the government should not try to favor one energy source over another. And he has vowed to revive the American coal industry, while saying Clinton’s policies would destroy it.

“His promise is, ‘We’re not going to do regulation, we’re going to go with whatever’s cheapest, and that’s coal,’” said Amy Myers Jaffe, a longtime energy market expert with UC Davis. “My problem with that is coal isn’t actually the cheapest.”

Indeed, while Obama’s Clean Power Plan would force utilities to move away from coal as an energy source, the coal industry has been increasingly unable to compete against a different fossil fuel — natural gas. Hydraulic fracturing, better known as fracking, has triggered a boom in domestic gas production and pulled down prices, undercutting coal. Analysts don’t expect that to change anytime soon.

“Unless (Trump) plans to subsidize coal mining, he’s not going to save those jobs,” Borenstein said.

Clinton, for her part, has proposed a $30 billion revitalization plan for coal-mining communities that would redevelop mining sites for factories, expand rural broadband access to boost small-town economies, retrain workers and guarantee their pensions in case their old companies go bankrupt.

While Clinton’s plans would shift America away from fossil fuels, she doesn’t reject them entirely.

During the primary campaign, for example, she staked out a much more nuanced position on fracking than her opponent, Bernie Sanders. Sanders called for ending the controversial practice — which uses pressurized water, sand and chemicals to extract fuel — while Clinton said she would let states or communities choose whether to ban it. She also said she would only support fracking if the companies involved revealed the chemicals they used and if there was no contamination of local water supplies.

“While some in the environmental community want to come down hard on fracking, at some point you need to have energy, and right now, that’s mostly fossil fuels,” Knappenberger said. “You can’t dial back on them too fast, too much.”

Clinton does, however, insist that the country start facing climate change now.

“Future generations will look back and wonder, ‘What we were thinking? How could we possibly be so irresponsible,’” she says on a video posted on her website.

David R. Baker is a San Francisco Chronicle staff writer. Email: dbaker@sfchronicle.com Twitter: @DavidBakerSF

The candidates on energy, climate change

Presidential contenders Hillary Clinton and Donald Trump have pushed opposing visions:

Donald Trump

Expand oil and natural gas drilling, on land and at sea, and spend the proceeds on roads, schools and infrastructure.

Revive the U.S. coal industry.

“Cancel” the Paris climate accord.

Hillary Clinton

Boost renewable power, installing 500 million solar panels in four years.

Follow through with the Paris climate accord and President Obama’s Clean Power Plan

Cut greenhouse gas emissions 30 percent below 2005 levels by 2025.

For more of the Chronicle’s election coverage, visit www.sfchronicle.com/election/2016/