The Supreme Court has ruled that parents from outside the European Union who have a child born in the State can be deported.
The full sitting of the Court ruled 5-2 against an appeal taken by two families facing deportation. They claimed that because they had a child born in the country they were entitled to resident status.
However the court did not agree.
The ruling means the State has the right to deport unsuccessful refugee applicants hoping to remain in Ireland because their children were born here. The decision is likely to affect hundreds of families.
The Supreme Court case was brought by a Czech family and a Nigerian man who lost their High Court challenges against deportation last year.
There is a ban on identitifying those involved in the case.
In the past few years non-nationals who have Irish born children had been granted residency even if their asylum applications had failed.
This stemmed from the 1990 Supreme Court judgment in the case of Fajujonu v. Minister for Justice, which held that when non-nationals had lived here for an "appreciable time" with their Irish born children, the children had the right to the company of their parents in the family unit.
In today's case, the two families had already been refused asylum in England and subsequently came to Ireland making identical asylum applications. Before a decision could be implemented, each wife gave birth to a child in Ireland. The families have only been in Ireland for 9 months and 7 months respectively.
In his judgment, Mr Justice Hardiman said: "In my view, the need to preserve respect for the asylum and immigration system is a generally applicable open-ended administrative reason capable of satisfying the test in Fajujonu."
He continued: "When this reason is given it must, of course, be considered in the light of the facts of each individual case. The courts have no appellate role in this process ... The element of discretion in any such decision has been conferred, not on the judiciary, but on the Executive."
Issuing her judgment, Ms Justice Denham said: "It does not flow from the rights of the child that the family or parents and siblings of Irish children have the right to reside in Ireland.
"It is for the Minister to weigh the factors in a fair and just manner in each case . . . even though that has the necessary consequence that in order to remain a family unit the child who is an Irish citizen must also leave the State".
All seven judges issued separate findings.