The relationship began over Facebook, where the teenagers shared their troubles at school. It progressed to meeting the woman's family, then to talking about sex. In July 2015, the pair had unprotected sex.
But the Canberra woman was just over 18, and the boy about 15-and-a-half. Nearly a year later police charged her with having underage sex with the boy, who was by law unable to consent.
The woman pleaded guilty to one count of sex with a young person under 16 and on Wednesday appeared in the ACT Supreme Court for sentence.
The offence carries a maximum penalty of 14 years jail.
The woman's defence lawyer, Jess Vogel, set out the circumstances behind the woman's offending, and provided to the court a series of Facebook and text messages including between the pair.
She said the relationship broke up later in 2015 with promises to remain best friends, but the woman had already fallen pregnant to the boy. The realisation came when she was on a school retreat.
She wanted to keep the child because her doctor had years ago told her she would have difficulty falling pregnant because of a medical condition.
She felt it may be her one chance to have a baby.
The woman messaged the boy to tell him he was the father, but that she had no expectations of him supporting her or the child either financially or emotionally. She had made no approaches to him or his family for assistance ever since. He was not on the child's birth certificate.
He became upset. He later wrote to the court and said he had felt uncomfortable about having sex with the woman, in part because of their age difference. He was worried about his financial future, and had not finished school.
Meanwhile, a friend messaged the woman on Facebook pretending to be someone else, and the woman admitted she knew the boy was not yet 16 when they had sex.
The woman gave birth to a baby girl in early 2016, and the boy's mother later reported her to police.
Ms Vogel asked the sentencing judge to consider a non-conviction order. She said the woman felt disappointed and sad to hear the boy felt uncomfortable about having sex, and she had believed he was willing, though now understood he could not consent.
"She does accept that the law is in place to protect young people," Ms Vogel said, "[she] has certainly learned a difficult lesson in relation to the age of consent."
The woman, now 20, would be registered as a sex offender for 15 years if convicted of the offence, Ms Vogel said, a result that would hamper her prospects of work and travel, as well as participating fully in her child's life as a single mother.
The Crown argued against a non-conviction order.
Despite the fact the woman had an unblemished criminal record and was of prior good character, prosecutor Sam McLaughlin said "there is some concern that she lacks an appreciation of her offending behaviour."
He said she had tried to minimise the offending, and appeared in a pre-sentence report more pre-occupied with her own difficulties and the court process than the impact of her offending on the victim.
She had at first denied knowing the boy was under 16.
Justice David Mossop on Wednesday decided not to convict the woman. He said while initially he thought a conviction was appropriate, he had since considered the use it would have in protecting the community, as well as the woman's prospects for work.
He sentenced her to a three-year good behaviour order that included conditions she be supervised by corrective services. She must also agree to forfeit $1000 if she breaches any conditions of the order.