WASHINGTON — Faced with steep shortages of medical supplies to combat the coronavirus pandemic, the White House is scrambling to coordinate with the private sector to import and manufacture testing swabs, face masks and hand sanitizer.

A lack of nasal swabs has been a pressing obstacle as the United States tries to accelerate testing for the coronavirus and gain a clearer view about the extent of the spread of the virus. Supply chains fractured by travel restrictions have hampered efforts to get crucial supplies, creating the need for the military to intervene even before President Trump invoked the Defense Production Act, which gives the federal government the power to force companies to make products for national security reasons.

Mr. Trump has so far held back from prompting such an intervention, declaring at a news conference on Thursday that “the federal government’s not supposed to be out there buying vast amounts of items and then shipping,” and adding, “You know, we’re not a shipping clerk.”

But this week, the White House did get into the shipping business, when the Defense Department sent a C-17 cargo aircraft to an air base in Italy to procure 800,000 swabs from Copan, a medical device manufacturer, and take them to Memphis.