The Supreme Court has delivered a landmark judgement upholding the constitutionality of a law that allows teenage boys - but not teenage girls - to be prosecuted for having underage sex.

The appeal arose from charges brought against a 15-year-old boy under the Criminal Law (Sexual Offences) Act 2006 for having sex with a 14-year-old girl in Donegal.

Under the 2006 Act "teenage boys can be held criminally liable for having sexual intercourse with an underage girl" while teenage girls are immune from prosecution.

In this case a 15-year-old boy is awaiting trial on charges of buggery and of having sexual intercourse with a 14-year-old girl in Donegal.

His lawyers argued the so called "romeo and juliet" law discriminates against him on gender grounds, as it assumes the male is the guilty predator and the female is the "innocent comely maiden".

In 2010 the High Court rejected his challenge because girls risk pregnancy and the law is entitled to place the burden of criminal sanction on those who bear the least adverse consequences.

This has been upheld on appeal with the court having regard to the entitlement of the Oireachtas to decide social policy.