Both the Keystone XL and Dakota Access pipeline projects – revived by Donald Trump by executive order on Tuesday – ran up against grassroots opposition fortified by support from the Barack Obama administration. The Keystone XL project was rejected by the president himself in November 2015 after the state department concluded that the pipeline promised no major benefit for energy security or pricing.

The Dakota Access pipeline project stalled out more recently, in December 2016, when the US army corps of engineers announced it would not grant a permit for the line to run under the Missouri river at a proposed site in North Dakota.

“The Standing Rock Sioux Tribe and all of Indian Country will be forever grateful to the Obama administration for this historic decision,” tribal chairman Dave Archambault said in a statement at the time. But a tribe attorney warned that future president Trump could try to overturn the Army corps decision – an effort that now appears to be under way.”

Both pipeline projects have also been mired in court battles. The company behind the Keystone pipeline, TransCanada Corporation, filed two legal challenges in January 2016 accusing accusing Obama of overstepping his authority and violating the North American Free Trade Agreement (Nafta).

The company behind the Dakota Access pipeline, Energy Transfer Partners, asked a federal judge in December to allow it to drill under the Missouri river immediately, despite its failure to win a permit from the army corps.

While both pipelines have produced high-profile clashes between environmentalists and energy interests, the conflict over the Keystone pipeline has run for much longer, since Obama first blocked it in early 2012. The plan for the Dakota Access pipeline, which is mostly completed, was presented to the public in 2014.

Opposition to the Keystone project was driven by grassroots environmental activism. Campaigners from 350.org and other environmental groups made it a test case of Obama’s promise to act on climate change – elevating a little-noticed infrastructure project into a national issue.

Opposition to the Dakota Access pipeline was identified with the Native American protesters who began to set up protest camps in April 2016, warning that a portion of the proposed pipeline route crossed sacred tribal grounds and that the line threatened to contaminate sources of drinking water. The local Standing Rock Sioux tribe and thousands of Native American supporters from across North America eventually set up camps in Cannon Ball, North Dakota, to try and block the oil project.

The Dakota Access pipeline is a $3.7bn project that would transport crude oil from the Bakken oil field in North Dakota to a refinery to Patoka, Illinois, near Chicago. The Keystone project was projected to cost about twice as much. The finished Keystone pipeline would carry tar sands oil from Alberta, Canada, to the Gulf Coast.

Defenders of the Keystone project argued that it would create as many as 50,000 construction jobs. The state department estimated the project would create 5,000 to 6,000 construction jobs, while the Obama White House put the figure even lower, at 2,000 construction jobs, and then just 50 to 100 jobs a year.

The Canadian government lobbied on behalf of the Keystone project. However, a planned trip by Trump son-in-law Jared Kushner, a top aide, to meet with Canadian prime minister Justin Trudeau on Tuesday was shelved due to “logistical problems”, Reuters quoted an unnamed Canadian government source as saying.