Nelson student Robert John Sissons, 22, has been sentenced to six months' home detention for having sex with a 13-year-old girl.
Deciding whether to suppress Sisson's name, Judge Tony Zohrab said he had to balance the interests of open justice against any "extreme hardship" that Sisson might experience if his name was published.
"This is serious offending, sexual offending against an under-aged girl," he said.
"The media are surrogates for the public in open court," he concluded, deciding not to order name suppression.
The court heard that Sissons and the victim met and began chatting on Facebook and text-messaging each other.
Court documents listed 1970 messages between them.
Their conversations "escalated very quickly" and became sexually "heated", the court heard.
In December, the victim visited Sissons' house, where they had sex. After her parents discovered what happened, Sissons was interviewed by police and charged with having an unlawful sexual connection with a young person.
Defence lawyer Michael Vesty said his client acknowledged he had done wrong, as evidenced by his immediate guilty plea and co-operation with police. But, "both parties were equally involved" in messaging and courting each other before the eventual sex, he said.
It was a "sad case, rather than a bad case".
Sissons was not trying to blame the victim, but explain how the situation had "spiralled out of control" for him, Mr Vesty said.
Since being charged, Sissons had put his studies on hold and sought help from a psychiatrist.
Crown prosecutor Emma Riddell acknowledged that Sissons did not force the victim to have sex with him, but said he was the man, nine years her senior, and he knew what he was doing was wrong.
"She was 13, you were an adult, therefore the fault lies with you," Judge Zohrab said.
Does Nelson deserve to be classed as a city?Related story: (See story)