A Southland baby owes its life to its grandmother who intervened during her own daughter's attempt at infanticide.

The teenage mother, who last month admitted a charge of attempted infanticide, was today sentenced to two years' intense supervision when she appeared at the High Court at Invercargill.

Justice John Fogarty said infanticide, by its very nature, enabled the court to take into account the 19-year-old's mental state at the time of her offending.

"The offence recognises young mothers do get into a disturbed state of mind."

He declined to go into details of what had happened but did say the woman's mother had intervened to save the life of the child.

The court heard the woman had experienced a troubled upbringing, having attended up to 30 different schools, been exposed to violence, different religious influences and was the victim of rape.

Justice Fogarty said he accepted she had a mental health problem which most likely had been exacerbated by the birth of the baby.

The woman had already received quality assistance from clinical psychiatrists since the offence.

He said his greatest concern was for the ongoing welfare of her two babies.

"You are in need of as much assistance as can be given."

He said he was satisfied Child, Youth and Family had a plan in place that would allow the young mother to, over time, develop and maintain relationships with her children.

As part of her sentence, the judge also ordered the woman undertake psychiatric treatment and counselling as directed by the probation service.

However, Justice Fogarty turned down a Crown application she complete community work, saying he wanted stresses in the woman's life kept to a minimum.

He also ordered her name be suppressed so that she could be rehabilitated and her two children live their lives without everyone knowing what their mother had done. He said it would be a family decision whether the victim of the attempted infanticide would ever be told what happened.