The United States Senate passed budget legislation Saturday that included a provision demanding that President Barack Obama decide the fate of the Keystone XL pipeline within 60 days.

U.S. Senators agreed to the terms of the legislation on Friday evening and approved it in a rare Saturday session.

The legislation calls for a two-month extension of a Social Security payroll tax cut and also extends jobless benefits for Americans who have been unemployed for six months or more.

GOP Senators pushed to include in the bill the Keystone provision, which requires that Obama decide within 60 days whether to give the pipeline the go-ahead.

Republican leaders have pushed for the pipeline project, citing the estimated 20,000 jobs it would create. However, according to the legislation, Obama can still decide to nix the deal if he deems the pipeline to be "not in the national interest."

Obama has put off deciding the fate of the 2,735-kilometre pipeline until after the 2012 elections. His announcement followed protests outside the White House that included thousands of demonstrators and the star power of Hollywood celebrities such as Mark Ruffalo and Margot Kidder.

White House communications chief Dan Pfeiffer issued a statement after Saturday's vote, saying Obama will sign the budget measure. However, the statement did not offer comment on the pipeline provision.

After Saturday's vote, the head of TransCanada Corp., the Calgary company behind the pipeline, also issued a statement.

"We look forward to learning in the coming days how this latest development will affect the ultimate approval process for our project," said Russ Girling, TransCanada's president and chief executive officer.

"What today's vote indicates is that the majority of Congress supports the benefits Keystone XL will bring to the United States."

The pipeline would carry oil from Alberta down to refineries on the U.S. Gulf Coast. Some residents and lawmakers in Montana, South Dakota, Nebraska, Kansas and Oklahoma object to the project, arguing that the pipeline's route through those states jeopardizes underground water systems.

With files from The Associated Press