A troubled Queensland teenager was experimenting when he "spontaneously" had sex with a dog nearly two years ago, a court has been told.

But the Ipswich District Court judge who sentenced him on Wednesday morning requested the graphic details of the act not be read out loud when the 19-year-old appeared before him charged with attempted bestiality, the Queensland Times reports.

Crown prosecutor Amanda Robinson told the court that his actions in attacking the dog, breed unknown, were not borne from cruelty but rather experimentation.

She described the act as "spontaneous and opportunistic rather than predatory".

Advertisement

The teen, from a regional Queensland town, confessed to having sex with the dog when police arrested him and "recognised the wrongfulness of his conduct", Ms Robinson said.

The dog was unharmed in the incident.

Judge Alexander Horneman-Wren requested she go no further in her description of the offending.

He asked that the facts of the offending not be recorded in sentencing.

Ms Robinson agreed the teen had already suffered public humiliation due to the incident.

Defence lawyer Julian Noud said the man had been left psychologically distressed and disturbed and was likely "impaired" mentally at the time of the offence.

Judge Horneman-Wren said the boy had been bullied prior to the incident and it did not reflect his true character.

"You had many distressing family insults that resulted in a number of unfortunate events and one particular tragedy was used in quite a horrible way by your peers to bully you which might provide some context about how this matter came about," he said.

"You were the subject of quite horrible harassment."

The judge sentenced the 19-year-old to two years' probation.

No conviction was recorded.