This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Employees at Apple stores must be paid for time they spend waiting for managers or security guards to search their bags to make sure they’re not stealing anything, the California Supreme Court ruled Thursday.

What’s more, the justices said their class-action ruling is retroactive, covering all Apple California rank-and-file employees who were subject to the bag-search policy from July 25, 2009, to the present.

Apple has 52 stores in California, but didn’t immediately comment or say how much the ruling might cost one of the world’s wealthiest tech companies. Attorneys for the company and affected workers also did not comment.

The decision may reverberate with other California employers who require workers to undergo security screenings, but the decision won’t affect other states because federal courts already ruled that there is no right to compensation under federal law.

The 9th U.S. Circuit Court of Appeals sent the appeal to the state’s high court to decide if the Apple workers could still prevail under California’s stricter worker protection laws. The federal appellate court said the issue “is of extreme importance to numerous employees and employers in California.”

Apple’s policy requires the workers to submit to the searches of packages or bags each time employees leave the store, on breaks and at day’s end. The same policy bars employees from bringing personal Apple devices to work unless they register them with store managers.

Failing to comply can get employees fired.

“Apple’s exit searches are required as a practical matter, occur at the workplace, involve a significant degree of control, are imposed primarily for Apple’s benefit, and are enforced through threat of discipline,” wrote Chief Justice Tani Cantil-Sakauye in the unanimous ruling. “Thus, according to the ‘hours worked’ control clause, plaintiffs ‘must be paid.’”

The process can take from five to 20 minutes to complete, and up to 45 minutes on the busiest days, according to court documents.

Apple is free to impose its bag-search policy as narrowly or broadly as it wishes and can minimize wait times by hiring more security guards, the justices said in a sometimes scolding decision.

The company argued that it is still permissive, in that employees have the option of not bringing purses or other bags to work. It said it could simply bar employees from bringing any personal possessions into the store, including their personal electronic devices.

The justices were unpersuaded.

“We find farfetched and untenable Apple’s claim that its bag-search policy can be justified as providing a benefit to its employees,” Cantil-Sakauye wrote.

“Apple’s personal convenience argument rings especially hollow with regard to personal Apple technology devices, such as an iPhone,” she dded. “The irony and inconsistency of Apple’s argument must be noted. Its characterization of the iPhone as unnecessary for its own employees is directly at odds with its description of the iPhone as an ‘integrated and integral’ part of the lives of everyone else.”

The National Retail Federation argued in opposing the lawsuit that “making one’s bag available for a bag check is now a routine matter. We do it all the time, before sporting events, concerts, lectures, political rallies, graduation ceremonies, and to enter public places.”

California already requires compensation for the time employees spend undergoing mandatory security checks. The U.S. and California chambers of commerce, which opposed the lawsuit, argued that if businesses must also pay for the time required to check bags brought to work “purely for personal convenience,” they will simply prohibit them entirely.

The chambers argued that Apple’s policy is reasonable, given the problem of theft by employees particularly of the small, valuable and easily concealable products it sells. That, in turn, drives up consumer costs.