The Iowa Supreme Court on Friday stood by its ruling that a dentist acted legally when he fired an assistant because he found her too attractive and worried he would try to start an affair.

Coming to the same conclusion as it did in December, the all-male court found that bosses can fire employees they see as threats to their marriages, even if the subordinates have not engaged in flirtatious or other inappropriate behavior. The court said such firings do not count as illegal sex discrimination because they are motivated by feelings, not gender.

The ruling upholds a judge's decision to dismiss a discrimination lawsuit filed against Fort Dodge dentist James Knight, who fired assistant Melissa Nelson, even while acknowledging she had been a stellar employee for 10 years. Knight and his wife believed that his attraction to Nelson — two decades younger than the dentist — had become a threat to their marriage. Nelson, now 33, was replaced by another woman; Knight had an all-female staff.