WASHINGTON, D.C - President Obama in a news conference Friday rejected the Keystone XL pipeline to Canada.

"The state department has decided that the Keystone XL pipeline would not serve the national interest of the United States. I agree with that opinion," he said.

Canadian Prime Minister Justin Trudeau expressed his disappointment in the decision, Obama said. The pipeline requires a presidential permit to cross the U.S.- Canadian border.

Obama said he felt the pipeline's importance has been exaggerated, that it will not be a silver bullet for the economy as some believe nor an ecological disaster as expressed by others.

The president said the biggest risk is to the environment, and that America must lead the way in reducing pollution by acting now.

"America is prepared to show the rest of the world the way forward," he said.

The 1,179-mile proposed pipeline has been in limbo for more than 7 years, awaiting a series of U.S. reviews that have dragged on more than five times longer than average, according to a recent Associated Press analysis.

TransCanada, an Alberta-based company with an expensive North American footprint, first applied for Keystone permits in September 2008 - shortly before Obama was elected. As envisioned, Keystone would snake from Canada's tar sands through Montana, South Dakota and Nebraska, then connect with existing pipelines to carry more than 800,000 barrels of crude oil a day to specialized refineries along the Texas Gulf Coast.

Democrats and environmental groups latched onto Keystone as emblematic of the type of dirty fossil fuels that must be phased out. Opponents chained themselves to construction equipment and the White House fence in protest, arguing that building the pipeline would be antithetical to Obama's call for cutting greenhouse gas emissions.

But Republicans, Canadian politicians and the energy industry touted what they said were profound economic benefits - thousands of U.S. construction jobs and billions injected into the economy.

They argued transporting crude by pipeline would be safer than alternatives like rail, and charged Obama with hypocrisy for complaining about the lack of investment in U.S. infrastructure while obstructing an $8 billion project.

The Associated Press contributed to this report.