Eager to demonstrate that he is in control of a viral outbreak that is spreading rapidly across the country, President Trump has ramped up efforts to show he is using some of his broadest powers as commander in chief.

But the unprecedented push has been plagued by growing confusion about how far his authorities actually extend and how much he is willing to use them.

He blindsided New York’s governor Saturday by publicly announcing a potential quarantine order on the state’s residents, only to retreat from the idea hours later. This came a day after he authorized his government to use the Defense Production Act, a move on which he’d been taking an on-again, off-again stance, but it remains unclear whether that power will be used.

And he is due to issue new guidelines next week about whether the country should continue social distancing practices — but he’s vacillated between all but declaring victory against the coronavirus and acceding to experts who say the national slowdown may have to continue for several more weeks.

President Trump’s administration has contradicted its coronavirus message at least 20 times over the past two months. (The Washington Post)

On Saturday, Trump flew on Air Force One to Norfolk, where he delivered remarks before the departure of a naval hospital ship bound for New York.

“As we gather today, our country is at war with an invisible enemy,” he said. “We are marshaling the full power of the American nation — economic, scientific, medical and military — to vanquish the virus. And we will do that.”

After Defense Secretary Mark T. Esper introduced him as “the president of the United States and our commander in chief,” Trump spoke against a backdrop of a dozen waving American flags and the massive hull of the USNS Comfort. It was the latest example of Trump presenting himself as a “wartime president,” a phrase he has used regularly even as his efforts to marshal his presidential powers have at times been unsteady and infused with partisan politics.

Trump signed an executive order Friday to invoke the Defense Production Act and compel General Motors to manufacture ventilators to help handle the surge of coronavirus patients.

While the president had originally signed an order on March 18 to activate the broad powers under the 1950 wartime legislation, he repeatedly said he did not need to use its powers to force the private sector to provide critical equipment. His initial reluctance to use the DPA came as several governors and hospital officials were publicly pleading with his administration to provide more personal protective equipment and ventilators before health systems became overwhelmed.

Trump’s decision to finally pull the trigger Friday on invoking the act earned him some plaudits from Democrats, who also chided him for not acting earlier.

“The only thing we know in these crises of pandemics is, the only thing that you really make a mistake is going too slow,” former vice president Joe Biden said Friday during a CNN town hall. “Going too fast, meaning providing the kind of help that is needed is — and planning for it — is not a problem.”

But it’s not clear how the order will impact GM, which said it was already working on making ventilators with Ventec Life Systems. Trump suggested Friday it may not be necessary to use the law to get GM to do what he wants despite authorizing its use.

“We’ll see. Maybe they’ll change their tune,” he told reporters. “But we didn’t want to play games with them.”

Trump has increasingly invoked his presidential powers in recent days as the United States has seen its number of confirmed coronavirus cases soar to more than 100,000, the most in the world. He signed a wave of major disaster declarations and issued an order activating additional National Guard troops to help states such as New York and New Jersey, where the outbreak has had the largest impact.

Trump could next use his presidential authority to effectively seal off those and other highly affected states.

He said Saturday that he was considering a forced quarantine for New York, New Jersey and Connecticut, announcing the potential move publicly without consulting the states’ governors.

“And I am now considering — we’ll make a decision very quickly, very shortly — a quarantine, because it’s such a hot area, of New York, New Jersey and Connecticut,” Trump said. “We’ll be announcing that, one way or the other, fairly soon.”

He also took to Twitter to float the idea.

“I am giving consideration to a QUARANTINE of developing ‘hot spots’, New York, New Jersey, and Connecticut. A decision will be made, one way or another, shortly,” he wrote.

New York Gov. Andrew M. Cuomo (D) said the topic had not come up during his phone call with Trump on Saturday morning — just minutes before the president announced the idea publicly.

“I haven’t had those conversations,” Cuomo said when asked about Trump’s comments. “I don’t even know what that means.”

Cuomo said later on CNN that such a move would be an illegal “declaration of war” against states.

New Jersey Gov. Phil Murphy (D) said he saw the news “as I was walking into this room” to hold a news conference. Though he had spoken with the president as recently as Friday, Murphy said, “nothing like a quarantine came up.”

Connecticut Gov. Ned Lamont (D) said he had been in touch with Cuomo and Murphy.

“I look forward to speaking to the President directly about his comments and any further enforcement actions, because confusion leads to panic,” he wrote on Twitter.

For several hours after the president floated the idea publicly, the White House did not provide any details or guidance about what such a quarantine would look like and what authorities the president would draw from. Some residents of New York opted to flee the city before an order that might trap them in the coronavirus epicenter.

“We’re evaluating all the options right now,” acting chief of staff Mark Meadows said in response to a question about Trump’s authority to quarantine certain states.

On Saturday night, Trump said he had decided against a quarantine and had asked the Centers for Disease Control and Prevention to issue a “strong Travel Advisory” for the New York metro area in consultation with the region’s governors.

“A quarantine will not be necessary,” Trump tweeted. “Thank you!”

The idea for the quarantine came about after Florida Gov. Ron DeSantis (R) complained to Trump that people from the New York metro area were pouring into his state, according to two White House officials who spoke on the condition of anonymity to describe the private deliberations.

Administration aides spent time Saturday explaining to Trump the quarantine would be impossible to enforce and could cause more problems, the officials said.

He agreed and spoke with Cuomo on Saturday night after making the decision.

Trump’s flurry of activity could also have a political impact as he attempts to show that he is not “aloof” as the country faces a national crisis, said Barbara Perry, a presidential historian at the University of Virginia’s Miller Center.

It’s a lesson that President George W. Bush learned after Hurricane Katrina, when he was photographed surveying the damage from a helicopter and was accused of not showing enough interest in the fate of New Orleans residents.

“Trump is following that lesson, and just digging right in,” she said. “He’s making up for lost time by saying, ‘But here I am today.’ ”

The president’s efforts to showcase his actions in response to the crisis have been more forceful and consistent than his attempts to provide Americans with information about what they should be doing to protect themselves.

He is scheduled to release new guidelines next week after the White House’s “15 Days to Slow the Spread” — a social distancing and pandemic mitigation effort — comes to an end.

While Trump has appeared eager to end the nationwide slowdown — he called for an April 12 “reopening” this week and began speaking about the coronavirus crisis in the past tense — many of his public health experts have cautioned against prematurely abandoning social distancing practices.

On Friday, Trump appeared to move away from embracing Easter as a preferred date for reopening the country, saying his decision would be guided by the need to prioritize protecting “life and safety, and then the economy.”

Trump sent a letter to governors on March 26 informing them that his administration would soon be publishing new guidelines for state and local officials about whether to relax, maintain or enhance social distancing measures such as business closures and bans on large gatherings. He said his administration would provide guidelines for counties categorized as high-risk, medium-risk and low-risk.

Despite Trump’s broad powers as president, he may have trouble convincing state and local officials to follow his lead, said Michael Strain, an economist at the right-leaning American Enterprise Institute.

“The president can say, ‘Everybody go back to work,’ but the governors and the mayors who have instituted these temporary shutdowns and these shelter-in-place orders are the ones that would have to lift those orders,” he said. “It’s very much an open question whether these mayors and governors would reverse their positions because of what the president has said.”

Trump has occasionally tried to appeal to a sense of national unity and pride in an effort to marshal a wartime footing. During his speech in Norfolk on Saturday, he described the world as “under attack by this horrible, invisible enemy.”

“And when we achieve our victory — this victory, your victory — we will emerge stronger and more united than ever before,” he added.

But he has also lashed out against his perceived political enemies, abandoning the bipartisanship that typically emerges during times of crisis.

On Friday, Trump attacked Michigan Gov. Gretchen Whitmer (D) and said he was inclined not to take phone calls from governors who were not sufficiently “appreciative.”

Josh Dawsey, Derek Hawkins and Colby Itkowitz contributed to this report.