Washington The Keystone XL pipeline got the green light Thursday from the U.S. Senate, moving the legislation to build the project closer to final congressional approval — and closer to an expected veto from President Barack Obama.

The fight over Keystone figured prominently in the 2014 U.S. Senate race in Louisiana, although the pipeline will have little direct impact in the state and was supported by both candidates who met in the Dec. 6 runoff: Democrat Mary Landrieu and Republican Bill Cassidy. Cassidy defeated Landrieu, who was running for a fourth term, and his win contributed to the Republican gains in the Senate that all but guaranteed approval of Keystone once the new Congress convened this month.

Although the 2014 elections gave Republicans a 54-46 majority in the Senate, they needed support from at least six Democrats to provide the Keystone bill a filibuster-proof majority. But the 62 votes would be five short of the number needed to override a veto.

The final 62-36 margin sends the measure to the Republican-controlled House, which has repeatedly voted for the pipeline in the past.

Both Cassidy and his Republican seatmate, David Vitter, voted for the bill.

“Today is a step in the right direction,” Cassidy said in a statement released after the vote. “I hope the president joins the majority of Americans who want this pipeline and other energy infrastructure projects built by signing this bill into law.”

And in his statement, Vitter said, “If President Obama is sincere in his pledge to promote ‘middle-class economics’ then he needs to put aside his political agenda and sign off on the Keystone XL pipeline.”

Opinion polls have shown majority popular support in Louisiana and across the country for the pipeline, which would bring “dirty” tar-sands oil from Canada to refineries on the Texas Gulf Coast. Supporters of the pipeline say it would create jobs and reduce American dependence on oil imported from unfriendly and unstable foreign countries outside North America.

Opponents fear it would result in oil spills and increased carbon emissions. The project has been stalled for years by Obama, whose approval is required because the pipeline crosses an international border.

The project is estimated to create 42,000 temporary construction jobs and 35 to 50 permanent jobs. The unfinished part of the pipeline is its northern leg, from Kansas into Canada, and a third of the construction jobs would be along that route. No part of the pipeline crosses Louisiana.

The bill would direct the Obama administration to approve the project. But Obama has said that before he decides on the pipeline, he wants to wait for completion of a State Department review. He also has said he doesn’t think the project would provide much benefit for the United States.

In her campaign against Cassidy, Landrieu touted the influence she had gained in the Senate by virtue of her seniority — in particular, her appointment early this year as chairwoman of the Energy and Natural Resources Committee, with its oversight of the oil and gas industry central to the Louisiana economy. Landrieu is a longtime friend of the industry.

After taking over as chairwoman, Landrieu pushed a Keystone bill through the committee. But then-Majority Leader Harry Reid, D-Nev., did not move to schedule a floor vote on the bill, which most Democrats opposed. Cassidy argued that Landrieu’s clout was meaningless as long as Democrats controlled the U.S. Senate.

After narrowly leading Cassidy in the Nov. 4 open primary in Louisiana, Landrieu successfully pushed for a floor vote on the bill in evident hopes of burnishing her record for the Dec. 6 runoff, which polls showed she was likely to lose. But she fell one vote short of the 60 needed.

Follow Gregory Roberts on Twitter @GregRobertsDC. For more coverage of government and politics, follow The Advocate Politics Blog at http://blogs.theadvocate.com/politicsblog/