“From a market perspective, the industry can find a different way to move that oil,” said Christine Tezak, an energy market analyst at ClearView Energy Partners, a Washington firm. “How long it takes is just a result of oil prices. If prices go up, companies will get the oil out.”

However, a State Department review also found that demand for the oil sands fuel would drop if oil prices fell below $65 a barrel, since moving oil by rail is more expensive than using a pipeline. An Environmental Protection Agency review of the project this year noted that under such circumstances, construction of the pipeline could be seen as contributing to emissions, since companies might be less likely to move the oil via expensive rail when oil prices are low — but would be more likely to move it cheaply via the pipeline. The price of oil has plummeted this year, hovering at less than $50 a barrel.

The recent election of a new Canadian prime minister, Justin Trudeau, may also have influenced Mr. Obama’s decision. Mr. Trudeau’s predecessor, Stephen Harper, had pushed the issue as a top priority in the relationship between the United States and Canada, personally urging Mr. Obama to approve the project. Blocking the project during the Harper administration would have bruised ties with a crucial ally.

While Mr. Trudeau also supports construction of the Keystone pipeline, he has not made the issue central to Canada’s relationship with the United States, and has criticized Mr. Harper for presenting Canada’s position as an ultimatum, while not taking substantial action on climate change related to the oil sands.

Mr. Trudeau did not raise the issue during his first post-election conversation with Mr. Obama.

The construction would have had little impact on the nation’s economy. A State Department analysis concluded that building the pipeline would have created jobs, but the total number represented less than one-tenth of 1 percent of the nation’s total employment. The analysis estimated that Keystone would support 42,000 temporary jobs over its two-year construction period — about 3,900 of them in construction and the rest in indirect support jobs, such as food service. The department estimated that the project would create about 35 permanent jobs.

Republicans and the oil industry criticized Mr. Obama for what they have long said was his acquiescence to the pressure of activists and environmentally minded political donors.