The High Court has released a man (41) who was jailed in 2004 for having sex with a 12-year-old girl.
Ms Justice Laffoy said the man's conviction was a "nullity" following the recent Supreme Court ruling that the State's laws on statutory rape were unconstitutional.
The man, then aged 38, had sex with the girl after buying her four Bacardi Breezer drinks and two vodkas in May 2002. He pleaded guilty in June 2004 and was sentenced to three years imprisonment.
The State strenuously opposed the release of the man from Arbour Hill Prison and today applied for a stay on Ms Justice Laffoy's order. But she said she did not have the power to impose such a delay.
In the High Court yesterday, Gerard Hogan SC, for the State, said it would be an appalling vista if those who had pleaded guilty to very serious offences involving pre-teen children were to get a "windfall bonus" from the Supreme Court judgment.
In her judgment Ms Justice Laffoy said that based on the Supreme Court decision, Section 1 (1) of the 1935 Criminal Law (Amendment) Act, which outlaws sex with a minor, ceased to have existence in 1937 when the Constitution was enacted.
As a result the offence did not exist in law when the man was charged, convicted or sentenced.
She said the determination she had to make was not concerned with whether the aggregate effect of her decision represents an "appalling vista".
She acknowledged that the decision may have the appearance of a "windfall bonus" but that the man's detention was rendered unlawful by the Supreme Court decision and "cannot continue".
"In the light of the declaration by the Supreme Court of the inconsistency of s. 1(1), the only offence of which the applicant was convicted, the conviction is a nullity, and the warrant is bad on its face," said Ms Justice Laffoy.
"Not being satisfied that the applicant is being detained in accordance with the law, I direct his release from detention in Arbour Hill Prison."
The man, wearing glasses and dressed in a suit, was led into the court this afternoon in handcuffs, which were removed following the ruling. Afterwards he was taken across the road by gardaí to the Bridewell Garda station which he left a short time later in a taxi.
The case of the man, identified only as Mr A, is the first of seven such cases expected to come back before the courts after the Supreme Court decision.
Minister for Justice, Equality and Law Reform Michael McDowell is today briefing Cabinet colleagues on proposals to close the loophole.
It is understood that new legislation could be ready for publication within two weeks, although the Minister sounded out the opinions of Cabinet colleagues at this morning's meeting.
Besides creating a new single age of consent of 16 for both sexes, Mr McDowell plans to make it illegal for anyone to have intercourse with a 14- to 16-year-old if they are more than two years older.
An accused person could not make a defence claiming there was consent if the person with whom they had sex was under 14, while adult women could be prosecuted for having sexual relations with under-age boys.
The Supreme Court struck down Section 1 (1) of the 1935 Criminal Law (Amendment) Act last week on the basis of a case brought by a young man who had consensual sex with a 14-year-old girl who told him she was 16.
He was 18 at the time. He claimed the law was unconstitutional because it was not open to him to claim he honestly believed she was older. Although the Supreme Court struck down Section 1 (1) of the Act, it upheld other aspects of it, including Section 14, which states consent is never a defence in a case involving someone aged 15 or under.