Washington: The US Senate on Thursday approved the immediate construction of the controversial Keystone XL oil pipeline from Canada to the United States, a Republican priority that faces a presidential veto threat.

After weeks of fierce debate, the Republican bill passed with 62 votes to 36, with eight Democrats defying President Barack Obama to support a project that would transport crude from Alberta’s oil sands to refineries along the US Gulf Coast.

The measure, tweaked during a roller-coaster process in which more than 40 amendments to the bill received floor consideration, heads back to the House of Representatives.

The House approved its own Keystone legislation earlier this month, and now must decide whether it passes the Senate measure or enters into bicameral conference to thrash out a compromise bill.

House Republican leaders were undecided Thursday on which path to take, but they applauded the Senate’s action.

“We hope President Obama will now drop his threat to veto this common-sense bill that would strengthen our energy security and create thousands and thousands of new, good-paying American jobs,” House Speaker John Boehner said.

Overcoming a presidential veto requires a two-thirds majority, and it would be a heavy lift for supporters to obtain 67 votes in the 100-member Senate.

Keystone XL was first proposed by TransCanada six years ago.

Republicans — and some Democrats — hail it as a 1,179-mile (1,900-kilometer) shovel-ready construction project that would create 40,000 jobs and boost US energy security.

Many Democrats oppose it on environmental grounds, warning of the risks of pipeline leaks and how the “tar sands” oil takes more energy and water to process than conventional crude.

And they point to a State Department study that found that just 35 of the Keystone jobs would be permanent.

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