The US Congress has given final approval for the Keystone XL pipeline transporting Canadian oil to US refineries, but President Barack Obama is pledging to veto the measure.

The pipeline had stalled as it ran into criticism from environmentalists concerned over the crude that would be transported from Alberta’s oil sands, as well as approval delays by the Obama administration.

After numerous Republican attempts to force Obama’s hand on the project, the Senate passed its version of the bill last month with bipartisan support.

The House followed suit on Wednesday with a vote of 270 to 152 sending the bill to the president’s desk. Twenty-nine Democrats joined all but one Republican in backing the measure.

“It’s way past time to say yes,” Republican Mike Kelly said on the House floor.

Should the bill become law it would override the extended review process and ram through authorisation, allowing builder TransCanada to get to work on the 1,900-kilometre pipeline that Republicans insist is a job generator that will boost US energy security.

But the White House has threatened a veto out of environmental concerns and a wish for the review process to play out, a move some Republicans will no doubt use to bolster their argument ahead of the 2016 presidential race that Obama is blocking crucial job-creating initiatives.

“The president has been pretty clear that he does not think circumventing a well-established process for evaluating these projects is the right thing for congress,” White House spokesman Josh Earnest said in January.

The veto would be the third of Obama’s presidency, and by far the most significant.

Overcoming a veto would require a two-thirds majority in congress, an especially heavy lift in the 100-member Senate where Republicans hold 54 seats and would need 13 Democrats to join them.

The votes in both chambers failed to reach the veto-proof threshold.

With Keystone likely in limbo after congressional passage, House Speaker John Boehner reiterated his charge that Obama was hindering job creation.

“The president is standing with a bunch of left-fringe extremists and anarchists,” Boehner told reporters.

House Republican Cynthia Lummis described Obama’s veto threat as “beyond rational explanation” and urged the president to reconsider.

The project has already proved divisive this year. Republicans made Keystone their top priority after winning full control of congress in November’s election, citing a State Department review that concluded the pipeline would generate about 42,000 construction jobs.

Many Democrats have several objections: they say oil sands produce “dirty” crude that takes more energy and water to extract and refine than conventional crude; the project is a nod to a foreign company; and just 35 of the Keystone jobs will be permanent.

“And in the end, the refined oil coming in from Canada will not benefit the American economy” as most of it would be exported, Senate Democrat Dick Durbin said.

Various government departments have been reviewing the project to see if it would be in the “national interest”.

In mid-2013, Obama said such interest would be served “only if this project does not significantly exacerbate the problem of carbon pollution”.

The State Department, in its environmental impact assessment of January 2014, determined that Keystone would not likely alter overall greenhouse gas emissions.

Republicans argue that moving oil by pipeline releases far fewer emissions than transporting it by rail or road.