IOWA CITY, Iowa (AP) — A dentist acted legally when he fired an assistant that he found attractive simply because he and his wife viewed the woman as a threat to their marriage, the all-male Iowa Supreme Court ruled Friday.

The court ruled 7-0 that bosses can fire employees they see as an “irresistible attraction,” even if the employees have not engaged in flirtatious behavior or otherwise done anything wrong. Such firings may be unfair, but they are not unlawful discrimination under the Iowa Civil Rights Act because they are motivated by feelings and emotions, not gender, Justice Edward Mansfield wrote.

An attorney for Fort Dodge dentist James Knight said the decision, the first of its kind in Iowa, is a victory for family values because Knight fired Melissa Nelson in the interest of saving his marriage, not because she was a woman.

But Nelson’s attorney said Iowa’s all-male high court, one of only a handful in the nation, failed to recognize the discrimination that women see routinely in the workplace.

“These judges sent a message to Iowa women that they don’t think men can be held responsible for their sexual desires and that Iowa women are the ones who have to monitor and control their bosses’ sexual desires,” said attorney Paige Fiedler. “If they get out of hand, then the women can be legally fired for it.”

Nelson, 32, worked for Knight for 10 years, and he considered her a stellar worker. But in the final months of her employment, he complained that her tight clothing was distracting, once telling her that if his pants were bulging that was a sign her clothes were too revealing, according to the opinion.

He also once allegedly remarked about her infrequent sex life by saying, “that’s like having a Lamborghini in the garage and never driving it.”

Knight and Nelson — both married with children — started exchanging text messages, mostly about personal matters, such as their families. Knight’s wife, who also worked in the dental office, found out about the messages and demanded Nelson be fired. The Knights consulted with their pastor, who agreed that terminating Nelson was appropriate.

Knight fired Nelson and gave her one month’s severance. He later told Nelson’s husband that he worried he was getting too personally attached and feared he would eventually try to start an affair with her.

Nelson was stunned because she viewed the 53-year-old Knight as a father figure and had never been interested in starting a relationship, Fiedler said.

Nelson filed a lawsuit alleging gender discrimination, arguing she would not have been terminated if she was male. She did not allege sexual harassment because Knight’s conduct may not have risen to that level and didn’t particularly offend her, Fiedler said.

Knight argued Nelson was fired not because of her gender, but because her continued employment threatened his marriage. A district judge agreed, dismissing the case before trial, and the high court upheld that ruling.

Mansfield noted that Knight had an all-female workforce and Nelson was replaced by a woman.

He said the decision was in line with state and federal court rulings that found workers can be fired for relationships that cause jealousy and tension within a business owner’s family. One such case from the 8th Circuit Court of Appeals upheld a business owner’s firing of a valued employee who was seen by his wife as a threat to their marriage. In that case, the fired employee had engaged in flirtatious conduct.

Mansfield said allowing Nelson’s lawsuit would stretch the definition of discrimination to allow anyone fired over a relationship to file a claim arguing they would not have been fired but for their gender.

Knight’s attorney, Stuart Cochrane, said the court got it right. The decision clarified that bosses can make decisions showing favoritism to a family member without committing discrimination; in this case, by allowing Knight to honor his wife’s wishes to fire Nelson, he said.

Knight is a very religious and moral individual, and he sincerely believed that firing Nelson would be best for all parties, he said.

“While there was really no fault on the part of Mrs. Nelson, it was just as clear the decision to terminate her was not related to the fact that she was a woman,” he said. “The motives behind Dr. Knight terminating Mrs. Nelson were quite clear: He did so to preserve his marriage.

“I don’t view this as a decision that was either pro-women or opposed to women rights at all. In my view, this was a decision that followed the appropriate case law.”

(© Copyright 2012 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)