An Apple logo hangs above the entrance to the Apple store on 5th Avenue in the Manhattan borough of New York City, July 21, 2015. REUTERS/Mike Segar

By Dan Levine

SAN FRANCISCO (Reuters) - Apple Inc defeated a U.S. class action lawsuit brought by Apple retail workers over bag search practices at the company's California brick and mortar outlets, according to a court ruling on Saturday.

The decision, from U.S. District Judge William Alsup in San Francisco, came in a case where employees sued to be reimbursed for the time taken by Apple to search their bags to ensure they did not steal any merchandise.

At least two Apple retail store workers complained directly to Chief Executive Tim Cook that the technology company's policy of checking retail employees' bags as a security precaution was embarrassing and demeaning, according to court filings made public earlier in the case.

Lee Shalov, an attorney representing the plaintiffs, said they are disappointed by the ruling and intend to explore all options, including a possible appeal.

An Apple spokeswoman declined to comment.

Class members in the bag search case included more than 12,000 current and former employees, according to a previous ruling.

Plaintiffs Amanda Frlekin and Dean Pelle alleged that "screenings", or bag searches, designed to discourage theft, are conducted every time sales reps leave the store, including for meal breaks. Lawsuits from within Apple's ranks are rare.

In the ruling, Alsup said Apple workers can choose not to bring a bag to work, and thus would not be subjected to the delays of a search. No Apple employee filed court papers asserting a special need to bring a bag, Alsup wrote.

"Rather than prohibiting employees from bringing bags and personal Apple devices into the store altogether," Alsup wrote, "Apple took a milder approach to theft prevention and offered its employees the option to bring bags and personal Apple devices into a store subject to the condition that such items must be searched when they leave the store."

The case in U.S. District Court, Northern District of California is Amanda Frlekin et al. vs. Apple Inc., 13-cv-03451.

(Reporting by Dan Levine; Editing by Himani Sarkar, Robert Birsel)