Firmmaker Hong Sang-soo, 58, filed for divorce in 2016, over his relationship with actress Kim Min-hee

A cheating husband cannot divorce his wife despite having a years-long affair, a South Korean court ruled Friday, insisting only the injured party in a marriage could initiate a legal separation.

Movie director Hong Sang-soo, 58, a Cannes film festival regular, filed for divorce in 2016, shortly after his relationship with actress Kim Min-hee became public.

But Hong's wife, whom he wed in 1985, refused to play along -- leading to a drawn-out legal battle that has lasted for years.

Seoul Family Court on Friday dismissed Hong's petition, and awarded costs against him.

South Korea remains a conservative society, where until 2015, anyone indulging in extramarital sex risked a two-year prison sentence.

Even since decriminalisation, public disapproval of affairs remains strong.

Despite her successes on the silver screen, 37-year-old Kim -- who won best actress at Germany's prestigious Berlinale in 2017 -- has struggled to inspire warmth among the South Korean public.

Her portrayal of an out-of-work actress reeling from an affair with a married director in Hong's "On the Beach at Night Alone" appears to have been too close to real life for movie goers.

The law against adultery was originally intended to safeguard the rights of women at a time when marriage offered them some of their only legal protections.

Most had no independent income, and divorce carried enormous social stigma.

In 2015, when the country's highest court reaffirmed that only the injured party could initiate a divorce, it said "gender equality had some way to go".

Judges said women would be particularly vulnerable if unfaithful husbands were allowed to divorce them without any justifiable complaint.

Opponents of the current divorce laws say they violate individual freedoms and trap people in unhappy marriages.