WASHINGTON — Environmentalists have spent the past two years fighting the Keystone XL pipeline: They have built a human chain around the White House, clogged the State Department’s public comment system with more than a million emails and letters, and gotten themselves arrested at protests across the country.

But as bad as they argue the 1,700-mile pipeline would be for the planet, Keystone XL has been a boon to the environmental movement. While it remains unclear whether President Obama will approve the project, both sides agree that the fight has changed American environmental politics.

“I think it would be naïve for any energy infrastructure company to think that this would be a flash in the pan,” said Alexander J. Pourbaix, president of energy and oil pipelines at TransCanada, the company that has been trying to get a permit for the Keystone XL pipeline since 2008.

Environmentalists want to stop the transport of 800,000 barrels a day of heavy crude from oil sands formations in Canada to Texas refineries, and an oil extraction process that emits more greenhouse gases than other forms of production. Proponents of the Keystone XL project say that the oil will come out of the ground with or without a new pipeline and that other methods of transport, like rail, cause more pollution. They point out that TransCanada began operations on Wednesday on a southern pipeline segment that connects to existing pipelines to provide a route from Alberta to the Gulf Coast.