AUSTIN, Texas — A female Texas coach who accused another woman of making objectifying and lurid comments at work can't sue for sexual harassment because there are no signs the bad behavior was driven by sexual desire, the Texas Supreme Court ruled Friday.

The accuser's attorney blasted the 6-2 decision as setting an unfair legal precedent for future victims of same-sex sexual harassment in the workplace. And in a pointed dissent, two justices on the all-Republican court suggested there would be little debate if the case had involved a man and a woman.

The decision is timely as companies, sports leagues, statehouses and Hollywood are pledging to take tougher stances on sexual harassment and misconduct on the job amid recent scandals that have toppled many politicians and celebrities.

"It shows that the court is out of touch," said Brendan McBride, a San Antonio-based attorney for the accuser.

Catherine Clark had accused another female coach at their San Antonio middle school of making repeated comments about her breasts starting in 2007, telling her she would think about her during sex and inappropriately grabbing her during a photo. Republican Justice Eva Guzman, one of two women on the nine-member court in Texas, called the allegations "repugnant."

But in a lengthy majority opinion, Guzman wrote that context is as important as conduct. She said the evidence demonstrated that Clark's alleged harasser was rude and crass to men and women alike, likening the conduct to bullying that she said fell short of meeting the legal threshold of sexual harassment in a workplace.

"It takes more than a woman noticing and commenting on a feature of another woman's body —even in a complimentary way — to demonstrate sexual attraction," Guzman wrote. She also said that one instance of Clark being grabbed during a photo, while "understandably upsetting," could not reasonably be interpreted as sexually motivated given other factors and their prior interactions.

The other woman on Texas' highest civil court, Republican Justice Debra Lehrmann, joined in a dissent that began with a lengthy recounting of the allegations — only this time with the harasser being a hypothetical male coach named Andy.

"If Clark's harasser had been a male — the hypothetical "Andy" described above — this evidence would undoubtedly permit a reasonable juror to conclude that Clark suffered that type of harassment 'because' she is a woman," Republican Justice Jeffrey Boyd wrote.

Clark claimed the harassment began shortly after she was hired in 2007 by the Alamo Heights school district, which serves one of San Antonio's wealthiest enclaves. She sued after claiming she was fired for raising accusations of harassment. The district contended Clark was fired over performance.