A woman who dreamt of being a single mom asked her ex-boyfriend to impregnate her - and got more than she bargained for.

As well as a three-year-old son, a judge has told her the boy's father must have extensive co-parenting rights, which include custody every alternate weekend and at least four hours of father-son time on birthdays.

Judge Piet Koen said in his Durban High Court ruling that after their legal battle the boy's parents would have to "walk a long way of healing".

"I can only implore them and their respective extended families to do so in [their son's] best interests. Their respective love for [the boy] can make that possible."

The couple became romantically involved in January 2011 but broke up 18 months later. In 2014, the woman - a marketing co-ordinator from Morningside - asked her ex to impregnate her.

She told him she did not like the idea of using an unknown sperm donor and wanted her child to know the identity of the biological father.

There would be no obligations on the father and he could have a relationship with the child, she said.

The man, from Durban North, was 41 at the time and said in court papers he realised "this may be my only opportunity to become a father".

Within six weeks the woman was pregnant, and her ex accompanied her to antenatal classes, scans and medical appointments, even assisting with bills and spending R41000 preparing for the baby's arrival.

"During October 2014, [he] expressly indicated that he would like to take on responsibilities towards the child," said Koen. Although this led to arguments between the couple, the woman asked her ex to suggest names for the baby.

She rejected his ideas but listed him as the father on the child's birth certificate. She took the baby to see his paternal grandmother and allowed her ex to see him "on her terms".

But "strife and animosity" developed, said Koen, and when the baby was four months old an e-mail war broke out over the mother's request for a passport for the child.

In court papers, the father claimed the mother was using "visitation rights as currency" despite his attempts to seek mediation over co-parenting rights.

The father went to court on November 2015 to ask for scheduled contact with the child, and Koen's judgment last week hands him a comprehensive victory.

The boy will stay with him every Wednesday night, every other weekend and public holiday, half of all school holidays and every Father's Day.

The judge rejected the woman's claims that she and her ex had a "known sperm donor agreement" which made clear he would have no financial obligations or legal rights.

"[The child's] interests are absolutely paramount," he said. "They will be best served, even with [the child] having to move between two homes... knowing he is loved unconditionally by both [parents]."

He urged the couple to be mature in addressing temporary setbacks, "in [the child's] best interest".