Image copyright Reuters

The US Senate has narrowly failed to pass a bill approving the controversial Keystone XL oil pipeline.

The Senate voted by 59-41 in favour of the bill, but this was one vote short of the 60 needed to pass it.

The 1,179-mile (1,897km) pipeline would carry tar sands oil from Alberta, Canada, to the US state of Nebraska where it joins pipes running to Texas.

Republicans have vowed to approve the bill next year when the new Congress convenes.

The current Senate is controlled by the Democratic Party, but Republicans will control the next Senate, following gains in elections earlier this month.

President Barack Obama is said to take a "dim view" of the legislation, but has not directly threatened a veto in the event of the bill reaching the White House.

The pipeline project has pitted Republicans and other supporters - who say it will create much-needed jobs - against many Democrats and environmentalists who warn the pipeline will add to carbon emissions and contribute to global warming.

Republicans maintained their majority in the House and gained control of the US Senate during mid-term elections on 4 November. But the official start of the new Congress is not until early January.

The bill failed to pass despite all 45 current Republican senators as well as 14 Democrats voting in favour.

The Keystone extension

The proposed XL pipeline has the same origin and destination as an operational pipe, also called Keystone but takes a more direct route and has a wider diameter.

It would daily carry 830,000 barrels of mostly Canadian-produced oil from the oil sands in Alberta, Canada, to refineries in Steele City, Nebraska and then on to the Texas coast for export.

The southern section to the Gulf opened in January 2014.

It is a privately financed project, with the cost of construction shared between TransCanada, an energy company based in Calgary, Alberta, and other oil shippers.

Why is the Keystone XL pipeline so disputed?

A state department report raised no major environmental objections in February, but the final recommendation was delayed amid a court battle over the project in Nebraska.

The state department is involved because the pipeline would cross an international border.

The Keystone XL pipeline aims to carry some 830,000 barrels of heavy crude a day from the fields in Alberta to Nebraska.

The oil would then be transported on existing pipes to refineries in Texas. The southern section of the project was finished last year.

The bill passed easily in the House last week with a 252-161 vote, but it was not the first time the chamber had voted to approve the project.

Image copyright Getty Images Image caption Keystone XL has been criticised by environmental groups

The bill's sponsor, Louisiana Representative Bill Cassidy, is facing a run-off election against incumbent Democratic Senator Mary Landrieu for her seat.

Ms Landrieu - among the pipeline's Democratic supporters - successfully pushed the Senate to hold the vote on the measure on Tuesday and urged backing for the measure.