President Trump invoked rarely used wartime powers and announced the deployment of two naval ships Wednesday as he tried to boost the federal response to the coronavirus outbreak after days of bureaucratic delays and missteps.

“We’ll be invoking the Defense Production Act, just in case we need it,” Trump said Wednesday from the White House, referring to a 1950 law that could allow the federal government to compel the private sector to accelerate the development of critical medical equipment. “It can do a lot of good things if we need it.”

Trump’s move signaled an effort to stand up a more robust federal operation to combat a virus that has quickly spread across the country, taking hold in all 50 states and threatening to crush the economy. The flurry of announcements Wednesday marked the most concentrated campaign yet by the Trump administration to slow the advance of covid-19, the disease caused by the virus.

Trump, who spent weeks downplaying the risk posed by the virus before recently taking a more aggressive approach, continued his shift in tone as he compared the government’s posture to a military operation.

“It’s a war,” Trump said of the effort to combat the pandemic. He likened himself to a “wartime president.”

The Defense Department said Wednesday it was preparing two Navy hospital ships for deployments, including one slated to go to New York to boost the state’s medical capacity amid fears that the virus could become overwhelming should it spread among the millions of people who live in and around New York City. The Pentagon also said this week it would be making 5 million masks and 2,000 ventilators available for use by health workers.

The measures aim to ramp up what state and local officials have described as Washington’s frustratingly slow and disjointed early response to the epidemic, which they have said was plagued by inadequate testing and an ignorance about the prospect of widespread shortages in medical equipment and facilities.

New York Gov. Andrew M. Cuomo (D), who had criticized the federal government earlier in the week for not being more proactive, said Wednesday that he is grateful that the Trump administration is stepping up its efforts.

“The president and I agreed yesterday, look, we’re fighting the same war — and this is a war,” he said Wednesday morning. “He is fully engaged on trying to help New York. He’s being very creative and very energetic and I thank him for his partnership.”

As Trump pushed early on to limit the economic impact of the pandemic — focusing on a series of stimulus proposals and putting pressure on the Federal Reserve — critics including Cuomo said his administration was too lax in using federal powers to slow the spread of the disease at a time it might have been possible to contain it.

The federal government has promised a rapid increase in available tests for coronavirus after struggling to provide them earlier this month.

Former U.S. surgeon general Vivek H. Murthy said that while the administration’s moves to provide more testing and more medical equipment are welcome, such efforts are long overdue.

“People are struggling right now, they’re running out of masks and gowns and gloves, right now,” he said Wednesday on CNN.

Senate Minority Leader Charles E. Schumer (D-N.Y.) said Trump’s decision to invoke the Defense Production Act was necessary but not enough, tweeting that “so much more is needed NOW.”

“Making sure doctors and nurses have everything they need is our top priority,” he wrote. “We need masks, hospital beds, ventilators. We still need testing kits.”

It remained unclear how Trump’s signing of the Defense Production Act would be implemented. The president said on Twitter that he would only be using the broad authorities granted by the act if needed in a “worst-case scenario.”

Trump announced Wednesday that the Department of Housing and Urban Development would be suspending foreclosures and evictions until the end of April, and he said he would be closing the northern border with Canada to all but essential travel.

And the Trump administration is working with “several groups” to potentially overhaul the coronavirus testing regime by determining the feasibility of wide-scale self-swabbing, the president said.

None of the moves were able to calm the turbulent financial markets. The Dow Jones industrial average fell another 6 percent Wednesday, shedding more than 1,300 points. The stock market’s slide during the past month has wiped out nearly all of the gains achieved since Trump was inaugurated.

There are now more than 7,800 confirmed coronavirus cases throughout the country, and more than 115 have died, numbers that have been rising rapidly in recent days. Trump administration officials said that while the increase reflects additional testing capacity, the threat of a swiftly escalating crisis remained; the number of confirmed cases in the United States jumped more than 40 percent from Tuesday to Wednesday.

Trump’s invocation of the Defense Production Act comes just days after he declared the global pandemic a national emergency, a move that freed up billions of dollars in aid to state and local governments. Many state and local officials have appealed to the federal government for help dealing with an unprecedented disruption to their medical and economic systems.

Trump put the Federal Emergency Management Agency at its highest level of operation Wednesday, indicating that the agency will take on an increasingly greater role managing the nonmedical elements of the government’s disaster response.

“FEMA now is fully engaged at the highest levels,” Trump told reporters. “Today FEMA is activated in every region at Level 1 … the highest level.”

The agency was preparing to deploy more than 50 teams across the country to support jurisdictions struggling to cope with the coronavirus shutdowns and disruptions, FEMA spokesperson Lizzie Litzow said.

The four-person teams “will be there to support states as they activate their emergency operations centers,” Litzow said.

The Trump administration to date has used FEMA mostly in a secondary role, with the Department of Health and Human Services and the Centers for Disease Control taking the lead among federal agencies.

“This starts to shift the operational center of gravity from HHS to FEMA,” said Dan Kaniewski, who stepped down in January as the agency’s second-in-command.

The White House Task Force will continue to run the government response, but FEMA is the best-qualified to coordinate among federal agencies, deploy resources and respond to state requests for assistance, while allowing HHS and the CDC to continue to take the lead on the medical emergency response, Kaniewski added.

“FEMA is the quarterback for the federal response to disasters,” he said. “This is a disaster, and it needs to be coordinated.”

FEMA Administrator Peter Gaynor briefed the White House coronavirus task force about the agency’s assets and resources for the first time Wednesday, Litzow said.

The agency does not have stockpiles of materials or medical supplies on hand, but its incident managers are tasked with assisting states and localities with the procurement process and by providing financial resources.

The agency’s 10 regional coordinating offices are working with state governments and the emergency teams will support them, Litzow said. “Our regional administrators are in touch with all the governors and in touch with the White House Task Force,” she said. “This is the whole of government response.”

Trump plans to visit FEMA’s emergency operations center in Washington on Thursday.

FEMA has broad authority to coordinate among federal agencies in response to a natural disaster. Officials at the agency will continue to play a “supporting role” to federal authorities because the coronavirus is a public health pandemic, rather than a natural disaster like a hurricane or flood.

Trump’s declaration of a national emergency last week allowed state and local officials to request direct federal assistance to respond to the pandemic, opening up more than $40 billion in disaster relief aid.

The requests have begun to pour in.

Florida has asked for 2 million face masks, 500,000 gloves, 5,000 ventilators, among other items. State officials also have contacted the Trump administration about the potential for deploying naval ships into Florida’s ports to provide additional medical capacity.

In New York, which is now home to the largest number of confirmed cases, Cuomo has warned that his state could run out of capacity to treat patients. He said the naval ship Trump promised to send, the USNS Comfort, would be “a floating hospital” docked in New York’s harbor.

The Comfort and its sister ship, the USNS Mercy, each have about 1,000 beds — the size of a large hospital. They would each be able to offer support in one location, but it is unclear when they would be available.

The Comfort, based in Norfolk, is currently under maintenance, according to Defense Secretary Mark T. Esper, and could take several weeks to arrive in New York. The Mercy is based in San Diego, and Trump said Wednesday that the administration hasn’t “made the final determination as to where it’s going to go on the West Coast.”

Trump misspoke at one point and said the Comfort is in San Diego and suggested that the ships “can be launched over the next week or so, depending on need.”

Defense officials have said repeatedly that it can take longer than that to assemble the needed medical personnel to staff the ships. On Tuesday, Esper also said that he was concerned that calling upon reserve service members who already are working in other medical facilities as civilians could be counterproductive.

“We’ve got to be very conscious of and careful of as we call up these units and use them to support the states, that we aren’t robbing Peter to pay Paul, so to speak,” Esper said.

In a statement released after Trump’s announcement, the Navy said the ships are preparing to deploy “if called upon.” Both of them are undergoing scheduled maintenance and are staffing up to deploy as “soon as possible,” the statement said. As Esper suggested on Tuesday, the hospital ships will not be deployed to treat patients with the coronavirus, the Navy said. That’s a reflection of the ship’s design, which has an open floor plan and is focused on treating trauma patients.

The White House has outlined a number of other steps aimed at combating the coronavirus, including seeking to speed up the production of a vaccine and issuing national guidelines to encourage “social distancing.” On Wednesday, the administration unveiled a series of new public service announcements aimed at amplifying its public health message.

The Trump administration has said it would expand Medicare coverage of telehealth services to allow seniors to see their doctors without having to leave home, and Vice President Pence said that HHS would issue new regulations allowing doctors to practice across state lines.

Trump touted those moves as he sought to defend his response to the outbreak. He also emphasized his country-specific label for the pandemic.

“I always treated the Chinese Virus very seriously, and have done a very good job from the beginning, including my very early decision to close the ‘borders’ from China — against the wishes of almost all,” the president wrote on Twitter, complaining about media coverage of his handling of the crisis.

Laurie McGinley, Lisa Rein and Seung Min Kim contributed to this report.