MADISON, Wis. (AP) — Hormel Foods Corporation owes hundreds of workers at its Beloit canning plant back wages for the time they spent putting on and taking off required clothing and equipment, the Wisconsin Supreme Court ruled Tuesday.

The high court ruled in a 4-2 decision that state Department of Workforce Development rules mandate that an employee must be paid for all time spent in physical and mental exertion controlled or required by the employer. Minnesota-based Hormel’s requirements that employees wear the protective gear are a crucial part of the workers’ principal activity, meaning they should be compensated for the time they spent donning and doffing the gear.

READ MORE: Girl In Very Critical Condition After Being Shot In Head In North Minneapolis

The ruling upholds a 2014 decision from Rock County Circuit Judge Michael Fitzpatrick awarding 330 workers a total of $195,000 in back wages.

“Cleanliness and food safety are ‘intrinsic elements’ of preparing and canning food at the Hormel canning facility,” Justice Shirley Abrahamson wrote for the majority. “The clothing and equipment is integral and indispensable to the performance of the employees’ job function … of preparing canned food.”

Hormel attorney Thomas Krukowski didn’t immediately respond to an email Tuesday morning seeking comment.

READ MORE: Brooklyn Center Passes Sweeping Public Safety Resolution To Reform Policing

According to court documents, Hormel has adopted work rules to meet federal cleanliness, quality and safety standards. The rules require employees to wear company-provided hard hats, hearing and eye protection, hair nets and sanitary shoes at all times. The equipment and clothing can’t be worn outside the plant.

Both the worker’s union and Hormel stipulated that the median time for putting on the gear and taking it off is 5.7 minutes per day, which works out to about 24 hours per year.

Employees had to be dressed, checked in and at their workstations at their assigned start times to be considered on time. The workers start getting paid at the start of their shift, not at the time of checking in. They also had to check out at the end of the day and had to change out of their gear after checking out.

MORE NEWS: Starting Tuesday, Allina Clinics In Minnesota Will Start Vaccinating 12- To 15-Year-Olds

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)