A man who is charged with having sex with a 14-year-old girl when he was 15, has lost his high court challenge to the law under which he is charged.

The man, who is now 18, had claimed that the section 2006 law - that allows him to be prosecuted, while no charges can be brought against the girl - was old fashioned gender-based discrimination for which the State had no justification.

He is charged under the so-called 'Romeo and Juliet' law - Criminal Law Offences Act 2006 and faces a maximum of five years in jail if convicted. Under the same act, a girl under 17 cannot be charged with the same offence.

The case was heard last December, and in her ruling today Ms Justice Dunne said it was clear from studies that the adverse affect of underage sex - such as pregnancy, early parenthood and resulting lower educational and occupational attainment - fall to a greater extent on girls than boys.

Far from being an example of good old fashioned discrimination or a form of rough equalisation, as contented by lawyers for the young man, the law provided a limited immunity to girls in the one area of sexual activity that can result in pregnancy, she said.

She said the law was there to protect children from sexual abuse.

Girls and boys were equally liable to prosecution in respect of sexual activity, falling short of sexual intercourse. Section 5 only applies to sexual intercourse - thus the immunity only applied to the one area of sexual activity that can result in pregnancy. It is the one consequence of sexual activity that carries no risk for boys or men, she said.

Justice Dunne said society was entitled to deter such activity and to place the burden of criminal sanction on those who bear the least adverse consequences of such activity. She said the act goes no further than was necessary to achieve this object.

Last December Senior Counsel for the young man, Gerard Hogan, told the court that he legislation under which he is charged proceeded on the basis that the boy was the 'guilty party' and the girl was the 'comely maiden' whose virtue must be protected.

He said if convicted, the boy would face a conviction for a sexual offence with all the ignominy and distress associated with that. He said he faces the prospect of having his life destroyed and added that five years in prison and a conviction for a sexual offence for a boy of 15 who engaged in consensual sexual activity was a 'savage penalty'.

He said it was gender-based legislation and while no one would suggest that pregnancy in a young girl was something to be countenanced, there was no comparison between pregnancy and the prosecution for a sexual offence which would destroy a young life.

The legislation was enacted in the aftermath of the Supreme Court ruling that found that the laws governing statutory rape were unconstitutional because they did not allow for a defence of reasonable mistake about a girl's age.

The State had argued that the law was there to protect young people both male and female and was not paternalistic.

Lawyers for the state said the 2006 law was just one piece of legislation where gender discrimination was made as it had never been considered that females could perform the same sexual acts as males.

Similar gender specific laws applied in other jurisdictions and reflected a pattern repeated throughout out law making and dating back as far as AD 760, the court was told.

Ms Justice Dunne said the act as a whole was to protect children from sexual abuse. She said it deals with a wide range of sexual activities, circumstances and levels of culpability.

Careful consideration had been given to the sentencing regime for offenders. This was framework in which one must view the limited immunity conferred by Section 5. Girls and boys were equally liable to prosecution in respect of sexual activity, falling short of sexual intercourse.

Section 5 only applies to sexual intercourse - thus the immunity only applied to the one area of sexual activity that can result in pregnancy. It is the one consequence of sexual activity that carries no risk for boys or men.