SAN FRANCISCO -- A federal judge in San Francisco has ruled trendy clothing retailer Abercrombie & Fitch wrongly fired a Muslim worker who insisted on wearing a head scarf.

U.S. District Judge Yvonne Gonzalez Rogers said the company violated anti-discrimination laws when it fired Hani Khan from its Hollister store in San Mateo, Calif., in 2010. Rogers issued the ruling on Tuesday.

The company claimed the head scarf violated its policy governing the look of its employees, which it said was part of its marketing strategy. The store argued that deviating from its look policy would affect sales.

The U.S. Equal Employment Opportunity Commission filed a lawsuit on Khan's behalf in 2011.

A call to a spokesman for New Albany, Ohio-based Abercrombie & Fitch was not immediately returned.