WASHINGTON — President Trump moved swiftly Tuesday to advance the controversial Keystone XL and Dakota Access oil pipelines, signing executive actions to aggressively overhaul America’s energy policy and deal a sharp blow to Barack Obama’s legacy on climate change.

Obama had personally halted the Keystone XL project, which was to bring oil from Canada to the U.S., and major protest demonstrations have frozen work on the Dakota pipeline.

Trump, in his continuing effort to undo the past eight years of a Democratic president, invited the Keystone builder, TransCanada, to resubmit its application to the State Department for a presidential permit to construct and operate the pipeline. The company said it would reapply.

Obama halted the proposed pipeline in late 2015, declaring it would undercut U.S. efforts to clinch a global climate change deal that was a centerpiece of his environmental agenda.

Trump also ordered the U.S. Army Corps of Engineers to quickly review and approve construction and easement requests for the Dakota Access pipeline, a project that has led to major protests by American Indian groups and their supporters.

“From now on we are going to start making pipelines in the United States,” Trump said from the Oval Office, where he also vowed to require the actual pipe for Keystone to be manufactured in America.

Trump’s actions four days after he took office came on the heels of his decision to withdraw from a major trade agreement as he upends Obama’s policies, winning praise from congressional Republicans. Democrats in energy-producing state also hailed Trump’s actions on the pipelines as long-awaited steps to boost jobs and move the country toward energy independence.

But environmental groups and Native American tribes who have fought both projects for years pledged to defy Trump.

“President Trump will live to regret his actions today,” said Michael Brune, executive director of the Sierra Club.