A woman who shocked the country last year with the murder and brutal dismemberment of her ex-husband was sentenced to life behind bars on Thursday.

Koh Yu-jeong (37) kept her head down as the judge in the Jeju District Court read out the sentence and covered her face with her long hair.

But in an unexpected twist, Koh was cleared of a separate charge of killing her stepson, eliciting gasps of surprise from the audience. Koh's new husband, the father of the boy, watched intently as tears welled up in his eyes and clenched his fist and cried out when the sentence was read.

Koh Yu-jeong (right) leaves the Jeju District Court on Thursday.

The court ruled that Koh meticulously planned to murder her ex-husband at a mountain inn on Jeju Island in May 2019, dismembering his body and dumping the body parts in several places on her way back home in Cheongju, North Chungcheong Province.

The court also accepted evidence that Koh bought sedatives in Cheongju before meeting her ex-husband on Jeju and buying a knife, cleaning utensils, bleach and duct tape in a supermarket on the southern resort island.

"After considering all the evidence, the court cannot accept Koh's claim that it was a crime of passion after trying to resist her ex-husband's demand for sex," the judge noted.

Koh held a grudge against her ex-husband after a long legal battle over custody of their son.

The judge said, "I cannot find any trace of pity or guilt, and she continues to pass the blame on to the victim. She must be permanently separated from society."

But the court regarded the charge that she also killed her four-year-old stepson as not proven. The boy was found dead of suffocation at their home in Cheongju in March last year.

The father, who belatedly filed the complaint after Koh's arrest, went to sleep with the boy on the night of the incident and woke up to find the child dead beside him. Koh was sleeping in another room. An autopsy found signs of suffocation but no evidence of bodily harm or poison damage to the internal organs.

"The evidence presented cannot be seen as proof beyond reasonable doubt," the court said. "It cannot be ruled out that he was accidentally suffocated by his father's leg."

The sentencing drew unusual public interest, with dozens of would-be spectators locked out of the courtroom while others were forced to stand in the gallery.