The Hong Kong Court of Final Appeal has overturned the indecent-assault conviction of a man who bought sex services in 2014 from a 13-year-old girl, accepting his defense that he “honestly and reasonably” believed her claim that she was 17.

The appellant Choi Wai-lun, who was 22 and a third-year student at the University of Hong Kong at the time, was originally acquitted by a magistrate in 2015 after the lower court heard evidence from the girl and ruled that she really looked more mature than her actual age, Apple Daily reported.

The girl told the court that she had attempted compensated dating, which refers to teenage students providing companionship or, in many cases, sexual favors in exchange for money or gifts, out of “curiosity” in 2014.

She also admitted that she would try to dress in a way that made her look older when meeting clients, and the magistrate noted that the girl had given clients consent to perform sexual acts.

The magistrate acquitted Choi, finding that he honestly and reasonably believed that the girl was aged 16 or over.

But the prosecution appealed. The High Court decided that the offense of indecent assault in relation to a girl who is in fact under the age of 16 is one of absolute liability, meaning that the appellant’s honest and reasonable belief as to her age was no defense.

Choi took the case to the top court, which overturned the conviction on Wednesday.

The five-judge panel said that while there was a need to provide girls and boys aged below 16 a “high degree of protection against sexual exploitation,” in this case, it was more probable than not that the accused “honestly and reasonably” believed the girl was over the legal age limit.

In August 2014, Choi visited an adult website on which the girl had posted an advertisement, describing herself as aged 17 and offering sexual services at listed prices.

Choi asked for and received a photo of the girl and they arranged to meet. They went to a guesthouse where they showered together and Choi ran his hands over her body. The girl then performed oral sex on him.

Choi testified earlier that he thought that her photo was consistent with her being 17 and this supposition was further supported when they met, as the girl appeared relatively tall, with well-developed bodily features, and spoke in a mature manner.

He said he did not suspect that she was under 16.