One person was critically injured and two dozen others were treated at five hospitals Wednesday after a can of bear repellent fell off a shelf at an Amazon warehouse in Robbinsville, officials said.

One of the workers had to be intubated and was sent to the intensive care unit, Robert Wood Johnson hospital officials told NBC New York.

However, late Wednesday night, an Amazon spokeswoman said all affected workers had been or were expected to be released within 24 hours.

Twenty-four workers were sent to hospitals in nearby Hamilton, Princeton, Hopewell and Trenton, said John Nalbone, communications and public information officer for Robbinsville Township. That total includes the person who was critically injured.

Ten of those people were sent to Robert Wood Johnson hospital in Hamilton, hospital spokeswoman Jessica Federman confirmed.

Six people were admitted to the nearest Capital Health locations: Three people were sent to the Hopewell Township location and the other three were taken to Capital Health Regional Medical Center in Trenton. All six patients were in stable condition, said Katie Stier, a representative for Capital Health.

"They probably won't even stay the night." Stier said.

Another 30 people were treated at the scene of the fulfillment center, in an industrial park off Interstate 195. There was no threat to area residents, Nalbone said.

The can, which weighed 9 ounces, fell off a shelf on the third floor of the south wing of the warehouse and accidentally dispersed, Nalbone said. An automated machine punctured the can, setting off the repellent. The active ingredient in the repellent is the irritant capsaicin and is "extremely concentrated," Nalbone said.

The spill was “inexcusable,” said Stuart Appelbaum, president of the Retail, Wholesale and Department Store Union, in a statement. Appelbaum took aim at the automated robots, suggesting that they create a dangerous work environment.

"This is another outrageous example of the company putting profits over the health and safety of their workers, and we cannot stand for this." Appelbaum said.

Appelbaum called for accountability on Amazon's part, saying the union will continue to fight the company's dangerous labor practices.

The incident "implies a profound lack of safety planning and training," said Alberto Arroyo, co-manager of the Laundry, Distribution & Food Service Joint Board of the Workers United/SEIU union, and Debra Coyle McFadden, executive director of the NJ Work Environment Council, in a joint statement. The two groups are part of Warehouse Workers Stand Up, a coalition that is campaigning for reforms to protect warehouse workers.

The coalition is preparing to release a report next week on poor working conditions and safety violations in New Jersey warehouses.

“The safety of our employees is our top priority, and as such, all employees in that area have been relocated to a safe place and employees experiencing symptoms are being treated onsite," Amazon spokeswoman Rachael Lighty said in a statement. "As a precaution, some employees have been transported to local hospitals for evaluation and treatment. We appreciate the swift response of our local responders.”

"The company keeps saying that safety of workers is their 'top priority,' " Marcy Goldstein-Gelb, co-executive director of the National Council for Occupational Safety and Health, said in a statement. Consumers, she said, "have a right to ask: If that's true, why do people keep getting hurt, injured and killed at Amazon facilities?"

Safety record:Bear spray incident at NJ Amazon warehouse shines light on safety record

TCNJ crash:Midland Park native recalls aftermath of crash that killed Michael Sot

Emergency responders received a call just before 9 a.m. that 80 workers were complaining of difficulty breathing and burning in their eyes and throat. EMS set up a triage outside the warehouse to treat patients. Fifty-four workers at the facility reported difficulty breathing and a burning sensation in the eyes and throat, Nalbone said. The 30 people treated at the scene did not need further medical attention, he said.

First aid and fire vehicles were seen leaving the warehouse around 11:30 a.m. Just before 1:30 p.m., Nalbone said the building was cleared for re-entry.

The West Windsor Health Department, which serves Robbinsville, planned to return to Amazon on Wednesday night or Thursday morning to re-inspect the site as a precaution, Nalbone said.

Lighty said the incident would not delay operations or shipments at the warehouse. She said the incident is under investigation.

Staff Writers Joan Verdon and Anthony Zurita contributed to this article.