Keystone Pipeline, North Dakota
The Keystone Oil Pipeline is pictured under construction in North Dakota in this undated photograph released on January 18, 2012. The permit for the XL Pipeline, an extension to the Keystone Pipeline was rejected this week by the State Department. Reuters

(Reuters) - The House of Representatives passed an energy bill Thursday that would wrest control of a permit for the controversial Keystone XL oil pipeline away from President Barack Obama, who has put the project on hold.

The bill, part of a broader House Republican effort to fund highways and infrastructure projects, would also expand offshore oil drilling and open up parts of the Arctic National Wildlife Refuge to drilling.

While approval of the Keystone measure by the House was widely expected, what happens with a similar proposal in the Democratic-controlled Senate is not yet clear.

Senate leaders were still negotiating on Thursday whether to allow a vote on Keystone as part of debate on a highway funding legislation, said Sen. John Hoeven, R-N.D., who has been a key advocate for the $7 billion Canada-to-Texas project.

I think on the merits we're going to get it done. I don't know when. I hope in the highway bill, but if not, we'll stick with it, Hoeven told Reuters.

Hoeven developed legislation that would see Congress grant TransCanada a permit for the project, and filed the bill as an amendment to the highway funding package.

PUMP PRICES SURGE

Republicans have seized upon the Canadian oil pipeline as a way to criticize Obama for his job creation and energy policies in the 2012 election race.

After massive protests from environmental groups, Obama last month said the pipeline needed more environmental review for the portion running through Nebraska, where the state government had rejected an initial proposed route.

Republicans said the project would create thousands of jobs. Environmental groups, who want to kill the project because they argue Canada's oil sands produce too much pollution, say the numbers are inflated.

Republicans have seized on surging gasoline prices as another way to make their case for Keystone.

In the long term, increasing oil supply from North America would help improve energy security and moderate volatility in gasoline prices, Hoeven said.

I think we need to approve the Keystone XL project because that brings oil to us from our closest friend and ally rather than the Middle East, Hoeven said.

The pipeline will also carry oil from Hoeven's home state of North Dakota, where production has surged but infrastructure has failed to keep pace.

STEEP CLIMB

Even if the Keystone legislation makes it to the Senate floor for a vote, getting it passed will be difficult. There are currently 47 Republicans in the U.S. Senate, and they would need to find at least 13 Democrats to agree to move it forward.

The Senate and House would also need to agree on a highway bill, which could be difficult given major differences in size and scope between their proposed packages. And the bill would still need to have Obama's approval to become law.

Obama has already threatened to veto the House package, due in part to the Keystone provision.

(Editing by Todd Eastham)