A South Korean court has sentenced a teacher to life in prison for fatally stabbing an eight-year-old girl, in a case that shocked the nation.

Myeong Jae-wan, 48, killed Kim Hae-neul, after luring her into a classroom in the central city of Daejeon in February.

Prosecutors had sought the death penalty for Myeong, saying that the victim's family had asked for a harsh punishment.

But the court said that while the risk of reoffending is high, it is difficult to conclude that Myeong must be executed.

Myeong said that she would reflect on her mistakes for the rest of her life. She stated her judgement had weakened at the time of the stabbing as she was receiving mental health treatment.

According to prosecutors, Myeong showed no remorse during the investigation. However, she submitted numerous letters to the court expressing remorse for her actions.

Myeong had previously requested a six-month leave of absence, citing depression, but returned to school after 20 days following an evaluation that deemed her fit to work, according to the Daejeon education office.

There had been indications of violent behaviour prior to the incident, including a previous altercation where she put another teacher in a headlock.

On the morning of the stabbing, two education officials were at the school to investigate this earlier incident.

Myeong confessed to police that she purchased the weapon on the day of the attack and intended to take her life along with that of a random child.

Kim was reported missing after a bus driver notified the school that she had not been picked up that day. She was later found at the school with stab wounds alongside Myeong.

Myeong had a wound on her neck, which was suggested to be self-inflicted and treated later in the hospital.

The South Korean government has since called for measures to improve safety and prevent such tragedies from reoccurring.

In addition to the life sentence, Myeong has also been mandated to wear an electronic location tracking device for 30 years.

As an elementary school teacher, the accused was in a position to protect the victim, said the court's ruling. But she committed this brutal crime in which a child was not protected where they should be most safe.