SAN FRANCISCO — Amazon said Thursday that nearly 20,000 of its U.S. employees had tested positive, or had been presumed positive, for the coronavirus since the pandemic started spreading through the country this year.

The retailer has faced harsh criticism this year as hundreds of workers and critics have said it hasn’t done enough to keep employees safe as they work in its warehouses amid a surge in demand to send items to shoppers across the country.

Amazon said in a blog post that the number of employees who have had the illness includes its workers at its grocery store chain Whole Foods Market. In total, 19,816 employees have had covid-19 between March 1 and Sept. 19, it said, or about 1.44 percent of the 1,372,000 front-line workers employed by Amazon during that period.

(Amazon CEO Jeff Bezos owns The Washington Post.)

The tech giant has had a year of intense ups and downs due to the pandemic. Its sales have soared as people shopped more online, especially while shelter-in-place measures have been in place in many states. But some employees pushed back publicly on its working conditions, and shipping delays caused customers to vent their frustrations online.

Amazon emphasized that is at a lower infection rate than the U.S. population’s, citing Johns Hopkins University numbers.

The numbers did not include the company’s delivery drivers, who are typically contracted workers, according to Amazon spokeswoman Kelly Cheeseman.

The numbers only show Amazon’s infection rate in the United States, and only includes front-line employees, such as warehouse workers and Whole Foods cashiers. The total number of Amazon front-line workers includes people who worked for the company at any point from March 1 to Sept. 19 — including workers who have now left the company. Warehouses have notoriously high turnover rates among workers.

In March, workers in Spain and Italy tested positive for the virus and joined those in the United States and across Europe in signing a petition that called on Amazon to adopt stricter safety guidelines, The Washington Post reported.

More than 1,500 workers signed the petition, and one employee called the working conditions “totally insufficient” to keep people safe.

Since then, Amazon has rolled out stricter safety measures and started its own coronavirus testing lab to screen workers. Amazon said Thursday that it now conducts “thousands” of tests each day and has a goal to get to 50,000 tests daily at 650 sites by November.

Some worker groups think it still hasn’t done enough. The group that represents retail and grocery workers called for a congressional investigation Thursday. Amazon’s disclosure “is the most damning evidence we have seen that corporate America has completely failed to protect our country’s front line workers in this pandemic,” Marc Perrone, president of the United Food and Commercial Workers International Union, said in a statement.

In the spring, workers criticized Amazon for still shipping “unnecessary” items and requiring employees to work at the same fast speed as normal. Amazon says it has added measures including staggered employee break times, cleanings every 90 minutes and temperature checks and face masks.

Backlash continued in April when the company fired a warehouse worker in Staten Island who had helped organize an employee walkout. It also fired two technical workers who had been publicly critical of the warehouse conditions. An Amazon vice president quit shortly afterward to protest the firings of the two technical workers, as well as two warehouse workers.

Amazon said at the time that it fired the tech workers for violating company policies. It said it fired the Staten Island worker, Chris Smalls, for violating a quarantine.

Amazon released the state-by-state breakdown of the cases. In most states, Amazon’s infection rate was below the population as a whole. But not in Minnesota and West Virginia.

In Minnesota, Amazon employees had a 3.17 percent infection rate, compared with 1.58 percent for the state as a whole. In West Virginia, Amazon’s number was 1.31 percent, compared with 0.77 percent for the state.

It is unclear how many of the workers caught the virus while at work or from a co-worker.

Amazon urged other companies to also disclose their coronavirus infection rates.

“We all have a vested interest in returning to some version of normal and safely helping our communities and the economy,” it said in its blog post.

Amazon’s shipping and safety struggles during the pandemic have resulted in some boosts to its competitors, including Target and Walmart. But Amazon’s revenue surged 40 percent to $88.9 billion in its first full quarter affected by the coronavirus-fueled economic downturn.

The company has been hiring all year to keep up with increased demand. It announced early in the pandemic that it had hired a total of 175,000 seasonal workers to keep up with increased demand. It later said it would keep 125,000 of those jobs as permanent positions.

Last month, it said it would hire 100,000 full-time and part-time jobs in the United States and Canada as the holiday season approaches.

Geoffrey A. Fowler contributed to this report.