The GOP candidates for president have seized on high gas prices as a line of attack against President Obama, largely saying the answer is more domestic oil drilling.

But GOP front-runner Mitt Romney used to have a position seemingly at odds — at least in emphasis — with what he and the other Republicans are now advocating.

As Massachusetts governor, Romney said high gasoline prices "are probably here to stay," and he advocated policies to cut energy demand.

Now, Romney says President Obama's environmental policies are to blame for $4-per-gallon gasoline, and he is pushing for aggressive new oil and gas exploration.

"You see, when he was running, [Obama] talked about how his energy policies would cause energy prices to skyrocket," Romney said last month at a campaign event at Bradley University. "And when told that gasoline prices had jumped, he said that he would rather see them go up gradually."

Romney was referring to a 2008 interview that then-Sen. Barack Obama did with CNBC's John Harwood. When asked if higher gas prices could help the U.S., Obama said he would have "preferred a gradual adjustment."

"The fact that this is such a shock to American pocketbooks is not a good thing," Obama said.

Earlier in the interview, Obama said there wasn't much that could be done to bring prices down artificially. Instead, he said, his energy policy would look to the longer term.

"The only way we're going to deal with these high gas prices is if we change how we consume oil, and that means investing in alternative fuels," he said. "It means that we are raising fuel efficiency standards on cars, that we're helping the automakers retool."

Gov. Romney's Position

Back in May 2006, in the midst of another gas price shock, then-Gov. Romney came to a conclusion similar to Obama's. According to an account from the time in the Patriot Ledger newspaper, Romney objected to a temporary suspension of the state's gas tax, saying he'd rather press for more fuel-efficient vehicles.

"I'm very much in favor of people recognizing that these high gasoline prices are probably here to stay," Romney is quoted as saying in the article.

A month later, on the Charlie Rose show, Romney said the overuse of energy in America is a "major issue" — in particular, the overuse of oil.

"Look, if we could somehow magically wave a wand over our automobile fleet and replace all of our cars with the current best technology, 35 mpg-type technology, we'd be saving an extraordinary amount of oil," Romney said.

But this focus on fuel efficiency wasn't an aberration, and it became part of Romney's energy policy during his 2008 presidential bid.

From the start of his term as governor, Romney worked to promote smart growth, to get people out of their cars, and generally to reduce the state's carbon footprint.

In 2004, Romney introduced the Massachusetts Climate Protection Plan. In more than 50 pages, it laid out emissions targets and what it described as a "no-regrets policy" toward climate change.

"This plan is going to reduce pollution. It's going to cut energy demand," Romney said at a news conference. "It's also going to nurture job growth and boost our economy, because reducing greenhouse gases has multiple benefits."

Environmental advocates at the time wished the plan had gone further but found plenty to cheer.

"He wasn't Al Gore, but he wasn't Sarah Palin, either," says Jim Gomes, who was president of the Environmental League of Massachusetts at the time. He says the plan struck the kind of balance you might expect from a Republican governor in a blue state.

"It has a lot of things in it that could have come out of the Sierra Club," Gomes says. "And there's certainly no hint of 'drill, baby, drill' in it."

Candidate Romney's Position

A lot has changed since then, both in the national dialogue and, seemingly, in Romney's position. Climate change has fallen lower on voter's lists of priorities. And while Romney once said he believes humans contribute to global warming, in October, at Consul Energy in Pennsylvania, he said, "We don't know what's causing climate change, and the idea of spending trillions and trillions of dollars to try and reduce CO2 emissions is not the right course for us."

Five years ago, his emphasis was on efficiency; now it's on drilling. In a video posted by the liberal news site Think Progress, he says, "Let's aggressively develop our oil, our gas, our coal [and] our nuclear power. Look, [the] Marcellus Shale is a huge godsend for the nation. Let's develop it, aggressively."

When asked about Romney's apparent shift in emphasis, if not an outright reversal, his campaign said: "Gov. Romney believes the best way to help lower gas prices is for a long-term structural reform, which is why he supports aggressive action to expand domestic production."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.