Elsewhere in the country, other Amazon sellers were doing the same.

Chris Anderson, an Amazon seller in central Pennsylvania, said he and a friend had driven around Ohio, buying about 10,000 masks from stores. He used coupons to buy packs of 10 for around $15 each and resold them for $40 to $50. After Amazon’s cut and other costs, he estimates, he made a $25,000 profit.

Mr. Anderson is now holding 500 packs of antibacterial wipes after Amazon blocked him from selling them for $19 each, up from $16 weeks earlier. He bought the packs for $3 each.

Eric, a truck driver from Ohio who spoke on the condition that his surname not be published because he feared Amazon would retaliate, said he had also collected about 10,000 masks at stores. He bought each 10-pack for about $20 and sold most for roughly $80 each, though some he priced at $125.

“Even at $125 a box, they were selling almost instantly,” he said. “It was mind-blowing as far as what you could charge.” He estimates he made $35,000 to $40,000 in profit.

Now he has 1,000 more masks on order, but he’s not sure what to do with them. He said Amazon had been vague about what constituted price gouging, scaring away sellers who don’t want to risk losing their ability to sell on its site.

To regulators and many others, the sellers are sitting on a stockpile of medical supplies during a pandemic. The attorney general’s offices in California, Washington and New York are all investigating price gouging related to the coronavirus. California’s price-gouging law bars sellers from increasing prices by more than 10 percent after officials declare an emergency. New York’s law prohibits sellers from charging an “unconscionably excessive price” during emergencies.

An official at the Washington attorney general’s office said the agency believed it could apply the state’s consumer-protection law to sue platforms or sellers, even if they aren’t in Washington, as long as they were trying to sell to Washington residents.