As gas prices near $4 a gallon, Republicans are sharpening their attacks on President Obama for blocking the Keystone pipeline that would bring oil from Canada to Texas. Senate Republicans have introduced legislation to bar Obama from tapping the Strategic Oil Reserve unless he agrees to the pipeline. Michael Barone, an analyst with the right-leaning American Enterprise Institute, says GOP presidential candidates can credibly make the case that Obama’s decision to side with environmentalists and refuse to grant Trans-Canada Corporation the necessary permits amounts to “crony capitalism.”

“He gave a gift to his rich fundraisers,” Barone said at an AEI event last month, calling Canadian oil “the next best thing to producing it ourselves,” and Obama’s opposition a policy that “makes no rational sense.” A Pew Research Center survey finds that only about 60 percent of voters have heard about the proposed pipeline, but among those who have heard “at least a little about it,” 66 percent say the government should approve it, with only 23 percent saying it should not.

Republicans and many Democrats think Obama was playing to his political base when he held up construction of the pipeline to find an alternate route that is more environmentally friendly. That widespread belief in turn fuels an election-year narrative of Obama as an anti-oil president whose policies are making America more reliant on foreign oil versus a Republican Party that supports more domestic drilling and whose slogan is “drill, baby, drill.”

The easy caricature is not true, and it’s not the whole story, says Rep. Ed Markey, the ranking Democrat on the House Natural Resources Committee. Markey agrees it would be “a very good thing if the U.S. could be reliant on North American-produced oil,” but that’s not what the Canadians intend, he says. Keystone oil is headed for Port Arthur, Texas—a foreign-trade zone that allows tax-free transactions—and then on to Asia, not the U.S. This is an important point that is rarely made. “That foreign-trade zone is what made me suspicious of what the real agenda was for this oil,” says Markey.

At a congressional hearing in December, Markey asked the president of TransCanada if he would agree to allowing Keystone XL oil and its refined products to stay in the U.S. He said no. So Markey then proposed an amendment to that effect, and Republicans said no—that it couldn’t be done, because the market for oil is not just domestic; it’s global. What Canada wants to do, says Markey, “is create a connection between Alberta and Asia and use the United States as the place where the pipeline gets constructed. And so if that’s all we are is a middleman in this transaction, then the American people should know that.”

The GOP links the recent increase in gas prices to Obama’s obstinacy about Keystone even as oil production is at a record high. Last year for the first time the U.S. exported oil; in fact it was the number one export, a remarkable development says Markey. Yet consumers are paying more at the pump, which Republicans blame on Obama. Pushing back with a speech in New Hampshire Thursday on energy policy, Obama cited a news story that began with, “Gasoline prices are on the rise and Republicans are licking their chops.”

“Licking their chops!” Obama exclaimed to laughter. “Now, let me tell you, only in politics do people respond to bad news with such enthusiasm.” He went on to offer a vigorous defense of his policies, saying there are “no short-term silver bullets” to keep prices down, and citing increased demand for oil in countries like China, India and Brazil as the biggest reason for rising prices.

Markey is the go-to Democrat in Congress when it comes to sustainable energy issues. When Nancy Pelosi became Speaker and then Obama got elected, it looked for a time as if the Democrats would address climate change and make major modifications in the nation’s energy policy. Markey co-authored “cap and trade” legislation, which, along with Obama Care and Dodd-Frank, have become part of the GOP’s anti-Democrat mantra.

This is Markey’s 36th year representing his Boston-area district, and he points out that there are fewer Democrats now in the House than at any time since 1948. With elections coming up and Democrats seeing a chance to reclaim their majority, Markey views Keystone as a proxy for a much larger struggle between the old and the new, between Big Oil and the Green Revolution. “If you look at who is making promises to raise unlimited amounts of money this year, a high percentage of it is coming from the fossil fuel industry,” he says. “You don’t have to be Dick Tracy to figure this out. They want to kill this revolution.”

Republicans want to preserve $4 billion a year in tax breaks for oil, an industry they are closely aligned with. At the same time, they want to end incentives for solar and wind, emerging industries that over time threaten the dominance of oil and coal. “You can keep subsidizing a fossil fuel that’s been getting taxpayer dollars for a century, or you can place your bets on a clean-energy future,” Obama said in New Hampshire. It’s the kind of either-or debate that the voters will hear a lot more of this election year.