The U.S. Supreme Court has ruled unanimously that companies do not have to pay workers for time spent in anti-theft security screening at the end of a shift.

The decision is a major victory for retail enterprises and manufacturing businesses that could have been on the hook for billions of dollars in back pay for time spent in security screenings.

The court's ruling came Tuesday in a case involving Amazon warehouses and a temp agency, Integrity Staffing Solutions Inc., which screened workers for warehouses in Nevada. The workers were paid hourly wages to fill customer orders and package them to ship. But, after they clocked out at the shift change, they were required to wait in line for an average of 25 minutes, as some 1,000 workers were processed through just two machines.

They sued the temp agency in charge of the screening, seeking pay for the time in line. But the Supreme Court ruled that under the federal Fair Labor Standards Act, a company is required to compensate workers only for duties that are "tied to the productive work" that employees are hired to perform. Writing for the court, Justice Clarence Thomas said that it matters not that an employer requires an activity; the activity must be "indispensable" and "tied to the productive work" that the employee is hired to do.

Copyright 2016 NPR. To see more, visit