WASHINGTON — President Donald 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.

But despite White House's efforts to direct the public's focus on the economy, Trump's continued insistence that as many as 5 million people illegally cast votes in the election induced further heartburn for the nascent administration Tuesday, as his press secretary struggled to explain and defend the unproven claim before abruptly ending the televised briefing.

Sean Spicer told reporters that Trump stood by his claim that 3 million to 5 million votes were illegally cast.

“He believes what he believes, based on the information he was provided,” Spicer said. But he would not detail what information he was referring to, citing only a 2008 study that called for updating voter rolls but did not conclude there has been pervasive election fraud.

Trump has made the claim before, apparently based off a story on the conspiracy theory website Infowars.

No evidence exists of widespread voter fraud. Such a collusion would be all but impossible, given the decentralized nature of U.S. elections.Trump's assertion appears to be part of a continuing pattern for him and his new administration in which falsehoods overshadow his outreach efforts. Both Trump and Spicer made false comments over the weekend about the crowds that gathered for the inauguration.

Obama halted the proposed pipeline in late 2015, declaring that 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 Native American 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 states 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. “Unwittingly he is beginning to build a wall — a wall of resistance. This fight is far from over.”

The 1,179-mile Keystone XL pipeline would run from Canada to Nebraska, where it would join other lines already leading to refineries along the Gulf Coast.

Trump directed the State Department and other agencies to make a decision within 60 days of a final application and declared that a 2014 State Department environmental study satisfies required reviews under environmental and endangered species laws.

Environmental groups promised a legal challenge, arguing a new application requires a new review.

State Department approval is needed because the pipeline would cross the northern U.S border.

Trump will also begin rolling out executive actions on immigration Wednesday, beginning with steps to tighten border security — including his proposed wall along the U.S.-Mexico border — and other domestic immigration enforcement measures, according to two administration officials.

Also Tuesday, a person familiar with the selection process said Trump has narrowed his choice to fill the Supreme Court vacancy to three judges and Trump told reporters in the Oval Office on Tuesday that he'll be “making my decision this week” and “we'll be announcing it next week.”

The three are Neil Gorsuch, Thomas Hardiman and William Pryor, the person said, speaking anonymously because he was not authorized to speak publicly about internal decisions.

Gorsuch, 49, is on the Denver-based 10th U.S. Circuit Court of Appeals. Hardiman, 51, is based in Pittsburgh for the 3rd Circuit. Pryor, 54, is an Alabama-based judge on the 11th Circuit. All three were nominated by President George W. Bush for their current posts.

In a holdover from the Obama administration, FBI Director James Comey's name was included on a Justice Department document listing “career, term and similarly designated component heads” unaffected by the presidential transition.

Comey, the target of bipartisan criticism over his handling of politically sensitive investigations, is in his fourth year in the job.

As a practical matter, the Dakota Access project is likely to be completed first. The company building it says it is complete except for a section that would pass under the Missouri River near a camp in North Dakota where pipeline opponents are demonstrating.

The 1,200-mile pipeline would carry North Dakota oil through South Dakota and Iowa to an existing pipeline in Illinois. The proposed route skirts the Standing Rock Sioux tribe's reservation and crosses under Lake Oahe, a Missouri River reservoir in North Dakota that serves as the tribe's drinking water source.

The tribe's chairman accused Trump of breaking the law, citing treaty rights with the United States, and promised to fight the action in court.

“Americans know this pipeline was unfairly rerouted toward our nation and without our consent,” Dave Archambault said.

The Army decided last year to explore alternate routes for the Dakota pipeline after the tribe and its supporters said it threatened drinking water and Native American cultural sites.

The company developing the pipeline, Texas-based Energy Transfer Partners, says it will be safe.

“Today's news is a breath of fresh air, and proof that President Trump won't let radical special-interest groups stand in the way of doing what's best for American workers,” said Sen. John Cornyn of Texas, the second-ranking Republican in the Senate.

The Washington Bureau's Michael A. Memoli contributed to this article.