Updated

A jilted husband can proceed with a lawsuit against a doctor who had sex with the man's wife, a North Carolina appeals court ruled Tuesday.

Mark Malecek initially sued Dr. Derek Williams in 2015 after discovering Williams' affair with Malecek's wife, Amber. Malecek's lawsuit accused the doctor of "alienation of affection and criminal conversation" and sought at least $100,000 in damages.

Malecek alleged that Dr. Williams persuaded Amber to cheat on him despite knowing that she was married. At the time of their affair, Amber Malecek worked as a nurse at Wake Forest Baptist Health, where Dr. Williams is a pediatric cardiologist.

Mark Malecek's lawsuit alleged that his marriage was happy until his wife began working with Dr. Williams. The affair began in December 2014 and ended shortly after Malecek discovered illicit emails and text messages between the two the following month.

North Carolina is one of only six states that still allows lawsuits alleging alienation of affection. Williams' legal team had challenged North Carolina's law as unconstitutional, citing a 2003 Supreme Court decision voiding a Texas law outlawing homosexual acts because it violated constitutional rights to free speech and free expressions.

A Forsyth County trial judge ruled in favor of Williams last year in throwing out Malecek's lawsuit. However, a three-judge panel unanimously agreed Tuesday to allow Malacek's suit to go forward.

In his opinion, Judge Richard Dietz ruled that "alienation of affection" laws were "born out of misogyny and in modern times are often used as tools for enterprising divorce lawyers seeking leverage over the other side."

However, Dietz's ruling went on, the laws are also "designed to prevent and remedy personal injury, and to protect the promise of monogamy that accompanies most marriage commitments."

The largest alienation award in state history was in 2011, when a Wake County judge awarded $30 million to the former wife of a Raleigh business owner. The ex-wife had sued the businessman’s current spouse.

About 200 lawsuits alleging alienation are filed each year in North Carolina, but the potential liability is raised in virtually every divorce case that involves infidelity, Raleigh divorce attorney Lisa Angel told the Associated Press.

"People who are suffering a divorce as a result of an affair, there’s a lot of economic damage. It’s not that hard to make the case, as the court is making it clear here, that there’s injury to a person when this happens," Angel said.

But the lawsuits "do not preserve marriages or protect families and do not promote the reconciliation of broken marriages," Williams' lawyers said in a statement. Instead, "most of these suits are brought after the marriage is over and the intense litigation over personal and private matters is instead used by vindictive ex-spouses as a type of blackmail."

The Associated Press contributed to this report.