A woman who became pregnant to a 14-year-old boy – her daughter's best friend – has been jailed, and won't be able to care for the toddler in prison.

The woman was 33 when she fell pregnant in 2015 but denied to police she had sex with the boy, until DNA testing this year proved the teenager was the baby's father.

The woman will not be allowed to care for her toddler in prison. Credit:Penny Stephens

On Wednesday, the now-36-year-old woman was jailed for four years, to serve two years before she is eligible for parole, after pleading guilty to persistent sexual abuse of a child.

A County Court judge said the woman gave the boy alcohol and cannabis on one of his early visits to her Melbourne home in 2014.