Yaneth Lopez Valladares was working at the Del Rey Packing plant in Sanger, near Fresno, according to the county sheriff’s office.

She had worked at the company for two years before the incident on Friday, CNN reported.

The woman was a contract worker for the firm.

The woman was “severely injured” when her clothing became stuck in the machine used for processing raisins.

The clothing became tangled with a piece of machinery that breaks up bunches of raisins and she struck her head, the California Division of Occupational Safety and Health Administration said in a statement.

“An employee working for a farm labor contractor named Blessed Harvest was working on a Stem Grading Line when their clothing got caught on a shaft to a cylinder that breaks up raisin bunches, causing the employee to strike their head,” the statement read.

Two nearby employees shut down the machine but Valladares died at the scene.

Del Rey Packing Co. President Gerald Chooljian said in a statement: “We are in deep sorrow.”

The Department of Occupational Safety and Health (DOSH) is investigating the incident to determine whether any health and safety regulations were violated.

According to data from DOSH, there are thousands of deaths as a result of workplace accidents every year in the United States.

In 2018, 5,250 workers died on the job. Out of 4,779 worker fatalities in private industry in the same year, 1,008 or 21.1 percent were in construction—meaning one in five worker deaths were in construction.

Last year, a manufacturing worker died in California after reportedly getting stuck inside an industrial metal cutting machine that switched on.

The fatal incident occurred at German Machined Company Inc, which specializes in machining and assembly for the aerospace industry.

Los Angeles County Fire Department spokesperson Vanessa Lozano told KTLA that fire crew staff responding to the scene had been told the man was trapped inside a machine. But when the emergency services arrived, roughly five minutes later, it was already too late.

Gardena police Lieutenant Christopher Cuff said: “It appears that the employee was conducting some sort of maintenance on the machine when the machine was turned on.”

The victim, reported to be in his 50s, was pronounced dead at the scene.