Cheaters, listen up: It's now legal to have an affair in South Korea.

South Korea's highest court scrapped the controversial anti-adultery law -- and sent the shares of the country's biggest condom maker surging.

Stock of South Korean latex products manufacturer Unidus Corp. climbed 15%, the daily maximum on Korea's Exchange, after the court announced its decision on Thursday.

The court said the law infringed people's freedom to make their own decisions on sex, and violated the country's privacy laws.

Related: I have a fiance, a girlfriend and two boyfriends

Adulterers convicted under the law faced up to two years in jail. According to reports in Korean media, more than 50,000 South Koreans have been convicted for cheating on their spouses, and 35,000 were sentenced to jail time.

The anti-adultery law was first passed in 1953 to protect women in the male-dominated society.

It has been challenged three times since 1990, but the Constitutional Court has always upheld it. In 2008, the court struck down a complaint against the law, ruling the prohibition protected social harmony.