WASHINGTON -- The Republican-controlled United States Senate on Thursday approved a bill to construct the Keystone XL oil pipeline, defying a presidential veto threat and setting up the first of many battles with the White House over energy and the environment.

The 62-36 vote on the privately funded Canadian project advanced a top priority of the newly empowered Republicans, and marked the first time the Senate passed a bill authorizing the pipeline, despite numerous attempts to force President Barack Obama's hand on the issue. Nine Democrats joined with 53 Republicans to back the measure.

Still the vote was short of the threshold needed two-thirds to override a veto in the 100-member chamber and the legislation still must be reconciled with the version the House passed.

This bill "is an important accomplishment for the country," said Republican Majority Leader Mitch McConnell. "We are hoping the president upon reflection will agree to sign on to a bill that the State Department said could create up to 42,000 jobs and the State Department said creates little to no impact on the environment."

Democrats framed the bipartisan bill as gift to a foreign oil company that would have little benefit for the American people, because much of the oil would be exported. They tried and failed to get amendments on the bill to construct the pipeline with U.S. steel, ban exports of the oil and the products refined from it, and protect water resources.

The U.S. Senate agreed to add an energy efficiency measure, and went on the record saying climate change was not a hoax and the oil sands should be subject to a tax that helps pay for oil spill cleanups. Oil sands are currently exempt.

"This bill is a disgrace," said Sen. Barbara Boxer, the top Democrat on the Senate environment committee. "We tried on our side to make this a better bill and they turned us away."

Calgary-based TransCanada Corp., the developer of the project, said it was encouraged by the bipartisan support for Keystone. A statement from Russ Girling, CEO and president of the firm, addressed the question of whether the project should go ahead in light of declining oil prices.

"The Keystone XL is a project that was needed when the price of a barrel of oil was less than $40 in 2008, when we first made our application; at more than $100 last year; and around $45 today."

First proposed in 2008, the $8 billion pipeline project has been beset by delays in the state of Nebraska over its route and at the White House, where the president has resisted prior efforts by Congress to force him to make a decision. In 2012, Obama rejected the project after Congress attached a measure to a payroll tax cut extension that gave him a deadline to make a decision. TransCanada Corp. then reapplied.

Obama has said he will not be forced to make a decision on the pipeline, which requires presidential approval because it crosses an international border, until the review process concludes. Federal agencies' comments on whether the project is in the national interest are due Monday.

Environmental groups have called on Obama to reject the project outright, saying it would make it easier to tap a dirty source of energy that would exacerbate global warming. The State Department's analysis, assuming higher oil prices, found that shipping it by pipelines to rail or tankers would be worse for the planet.

Supporters say the pipeline is a critical piece of infrastructure that will create thousands of jobs during construction and boost energy security by importing oil from a friendly neighbour.

--With files from The Canadian Press