It's not easy to see victory in defeat. But that's exactly what proponents of the Keystone XL pipeline should be thinking after a bill to approve the project failed to get the necessary votes in the U.S. Senate this week.

The pipeline that would connect Alberta's oil sands to Gulf Coast refineries in Texas and Louisiana fell just one vote short of the 60 needed to override a Democratic filibuster and get it through the Senate.

But had the bill's mostly Republican backers won, the legislation would almost certainly have been vetoed by President Barack Obama — a move that would only have hardened the resolve of Keystone's opponents.

Failing by an oh-so tantalizing single vote on the first try likely achieves the opposite effect.

The result should, instead, galvanize supporters of Keystone heading into the new year when the Republicans take control of the Senate for the first time since Obama became president.

Look at the votes in the Republican-dominated House of Representatives, where support for the project has steadily grown from just September, when members voted 226-191 in favour of Keystone, to 252-161 earlier this month.

For Stephen Harper's government, approval of Keystone should be, to use the prime minister's own words, a ''no-brainer.'' It's also become the most significant irritant in Canada-U.S. relations, as Obama delayed, and delayed, and still delays making a decision.

South of the border, Keystone is not a bilateral problem as much as a domestic political issue, one Obama now seems willing to exploit to promote his environmental credentials.

''Understand what this project is," the president told reporters last week. "It is the ability of Canada to pump their oil, send it through our land, down to the Gulf, where it will be sold everywhere else. It doesn't have an impact on U.S. gas prices.''

"If my Republican friends want to focus on what's for the American people in terms of job creation and lower energy costs, we should be engaging in a conversation about what are we doing to produce even more homegrown energy."

Political dogma

As presidential statements go, Obama's was a fine example of political dogma. It was also, according to anyone promoting the project on this side of the border, breathtakingly inaccurate.

Keystone XL won't just carry Canadian oil, up to 20 per cent will be Bakken formation oil from Montana and North Dakota. What's more, American oil firms are heavily involved in oil sands production.

Congress Keystone

Messy politics. Louisiana Senator Mary Landrieu, a Democrat facing a run-off vote for re-election next month, was the co-sponsor of the bill this week to approve the Keystone pipeline. The bill just failed to get the 60 votes needed to overcome her own party's filibuster in the Senate. (The Associated Press)

Even if the president was right, that Keystone is to carry only Canadian oil, produced by Canadian companies, to discriminate against it on that basis violates the North American Free Trade Agreement.

In any event, the very idea that this is a choice between either Keystone or increasing U.S. oil production is nonsense.

Statistics kept by the U.S. Energy Information Agency show that Canada supplies the bulk of U.S. oil imports — more than 2.5 million barrels a day in August — or about a third of all of America's crude oil imports.

As to where the oil sands crude would end up, oil analysts say it just isn't true to suggest, as the president did, that it would either bypass Gulf Coast refineries, most of which are geared to refine exactly that kind of crude, or be refined there and shipped overseas.

Weak spots

So, where does that leave Canadian proponents of Keystone if the guy in charge is being selective with the facts, and when his position appears to relate more to his potential legacy than being good neighbours?

Here is the case Canadian proponents will continue to make:

First: approving Keystone XL is in the American interest. That means lobbying members of the incoming Congress and using Canada's consular offices to push the benefits in every state.

USA-KEYSTONE/SENATE

All politics is local? Climate advocates and representatives from the Rosebud Sioux Tribe in South Dakota protest against the Keystone XL pipeline in front of U.S. Senator Mary Landrieu's home in Louisiana. (Reuters)

As the late Tip O'Neill, a former speaker of the House famously said, "All politics is local," even when you're talking about a pipeline that crosses the U.S.-Canada border and will run through a half-dozen states in the Midwest.

Second: underscore the North American energy market is totally integrated. Building Keystone promotes a more reliable, more secure source of supply, safe from the political vagaries of the Middle East or Venezuela.

Third: blocking the pipeline won't stop development of the oil sands. If not Keystone, the oil will be shipped by rail.

The U.S. Energy Information Agency reports that oil and petroleum products accounted for the second largest increase in rail traffic in the U.S. in 2014. The Canadian Association of Petroleum Producers estimated in June that about 700,000 barrels a day will be transported to markets by rail in 2016, much of it to the U.S.

None of these arguments guarantees that Obama will change his mind.

But with a new Congress arriving in the new year, they could help sway enough Democrats to push future votes much closer to the two-thirds majority needed to override any presidential veto.

Faced by that prospect, Obama may be more inclined to deal, signing off on Keystone after all those delays, in return for Republican support for some other item on his agenda, like comprehensive immigration reform.

If that happens, Obama could very well claim victory in defeat. Something proponents of Keystone should be doing this week.