An 18-year-old Canberra man will have no conviction recorded against him, despite pleading guilty to having sex with a 13-year-old girl.

The ACT Supreme Court has heard the relationship came to light when the girl went to a medical clinic with stomach cramps and was found to be pregnant.

The court heard the pair were friends from early last year, and communicated on Facebook, where the girl said she was 16.

The court heard the girl had initiated sex on two occasions, until the man found out she was only 13, when he told her she was too young for him.

The pair did have sex once more, again initiated by the girl.

Justice John Nield has used his discretion to not convict the man, so that he will not be placed on the child sex offenders register for more than seven years.

Justice Nield says since the acts were initiated by the girl, mostly when the man believed she was more than 16, he would use his discretion and not record a conviction.

But he did place the man on a 12 month good behaviour bond.

The man shook with emotion as the verdict was read.