Ms Ok apologised for stirring up a controversy
One of South Korea's best-known actresses, Ok So-ri, has been given a suspended prison sentence of eight months for adultery.
She admitted the offence and the court suspended the sentence for two years.
The trial took place after Ms Ok failed to get the constitutional court to overturn the strict law that makes adultery a criminal offence.
In her petition she said the law was an infringement of human rights and amounted to revenge.
According to the BBC correspondent in Seoul, John Sudworth, the scandal has kept South Korea's tabloid newspapers and internet chatrooms buzzing for months.
'Damaging to social order'
South Korea is one of the few remaining non-Muslim countries where adultery remains a criminal offence.
A person found guilty of adultery can be jailed for up to two years.
THE ANTI-ADULTERY LAW
Enacted in 1953; initially applied only to married women
Constitutional Court upheld the law in 1990, 1993, 2001 and 2008
But the judges' support for the law has gradually declined. The law's repeal would require backing of six of the court's nine judges - in the last case, five judges backed its repeal
Hundreds of people are charged under the law every year, but only a few dozen are jailed
Supporters of the law claim adultery undermines the social order, and say the law protects women's rights in marriage
Its opponents claim the law is often abused as a means of revenge or securing greater financial divorce settlements; and say in reality those who suffer under the law are most often women
More than 1,000 people are charged each year, although, as in this case, very few are actually sent to jail.
The law has been challenged four times, but the country's top judges have always ruled that adultery is damaging to social order, and the offence should therefore remain a crime.
In this case, Ms Ok was sued by her former husband, Park Chul.
She admitted having an affair with a well-known pop singer, and blamed it on a loveless marriage to Mr Park.
The 40-year-old actress sought to have the adultery ban ruled an inconstitutional invasion of privacy, and in a petition to the Constitutional Court, her lawyers claimed the law had "degenerated into a means of revenge by the spouse, rather than a means of saving a marriage".
But the adultery ban was upheld, and judges in Seoul have now given her an eight-month suspended sentence, and her lover a six-month suspended term.
"I would like to say I'm sorry for stirring up such a controversy," Ms Ok said after the court judgement.
According to a survey carried out last year, nearly 68% of South Korean men and 12% of women confess to having sex outside marriage.