The Republican-controlled U.S. Senate passed a bill to approve the Keystone XL pipeline, setting up a conflict with President Barack Obama who has promised a veto.

The Senate voted 62-36 Thursday for the measure that would circumvent the administration review in progress for six years. Obama has said he wants to wait until the review is completed before deciding on whether to approve construction of the pipeline.

Differences with a version passed 266-153 by the House on Jan. 9 must be resolved before the legislation is sent to Obama, but supporters pledged to work through those quickly and send a final version to the president.

The bill was the first measure taken up by the new, Republican-controlled Senate. Lawmakers who back Keystone have sought for years to force Obama’s hand only to be turned away in the Senate when Democrats were in control.

Backers say the project would create jobs and increase U.S. energy security by tightening ties with Canada, where the proposed TransCanada Corp. pipeline would originate.

“The Keystone infrastructure project has been studied endlessly—endlessly—from nearly every possible angle,” Senate Majority Leader Mitch McConnell, a Kentucky Republican, said before the vote. “We need to build it.”

White House press secretary Josh Earnest Thursday reiterated that Obama would veto the Keystone legislation. Sen. Charles Schumer of New York, the Senate’s third-ranking Democrat, said supporters didn’t have the votes to override the veto.

The vote today capped two weeks of debate that included votes on dozens of amendments, showcasing a commitment by McConnell to allow a more free-wheeling discussion of legislation on the Senate floor.

Republicans overcame a stumble Monday when Democrats, objecting to limits on amendments they could offer, blocked a procedural vote. That fueled doubts Republicans could meet a goal of passing the bill this week.

The two sides agreed to debate additional amendments, and eventually nine Democrats joined Republicans to end debate on the measure earlier today and allow the final vote.

Senators adopted an amendment to promote energy efficiency efforts and made other relatively minor changes.

Republicans blocked Democratic attempts to put the Senate on record saying climate change was a significant problem caused by the burning of fossil fuels. Language saying climate change was happening was added, though it didn’t ascribe it to man-made causes.

The $8 billion Keystone project would run through Montana, South Dakota and Nebraska, where it would connect to an existing pipeline network that extends to refineries along the U.S. Gulf Coast.

Polls show more Americans support the project than oppose it, though the political payoff for Republicans in backing it probably is small.

A Washington Post/ABC News poll this month found 34% of respondents wanted the pipeline built now, while 61% said the review should continue. A Wall Street Journal/NBC News poll found 41% favored the pipeline. But more than a third—37%—said they didn’t know enough to have an opinion.

Environmentalists have rallied to oppose the pipeline because they say it would promote development of the oil sands, threatening Canada’s boreal forests, and spew more greenhouse gases tied to global warming into the air.

The State Department is overseeing the analysis because Keystone XL would cross the border. Eight federal agencies, including the Environmental Protection Agency, have until Monday to submit comments to the State Department.

Obama doesn’t face a deadline to decide.

TransCanada proposed building Keystone in Sept. 2008. Opposition in Nebraska led the company to alter its initial route by pushing the pipeline further east to avoid a sensitive habitat and aquifer in the state.

The company broke the project in two, building the southern half and reapplying for a presidential permit for the northern leg with the new route.

The legislation is S.1.