But others see undercurrents of racial unease that could boil into conflict, especially if hard times return. “In Irish literature there’s a big fear of the returned immigrant who brings all sorts of chaos with him,” said Mary Gilmartin, a geographer at the National University of Ireland, Maynooth. “Many people here feel threatened.”

As recently as the 1980s, young Irish were fleeing unemployment in droves, many to work illegally in the United States. By the late 1990s, an economic boom called the Celtic Tiger was luring them home, along with droves of foreign construction workers, farm hands, waitresses and nannies. A wave of asylum seekers joined them, many from Africa.

Some had escaped harrowing wars or genital mutilation. But officials grew skeptical of their claims as their numbers surged to about 12,000 in 2002 from a trickle a decade before.

Ireland not only offered citizenship to children born upon arrival; until 2003 it also allowed their illegal-immigrant parents to stay, a shortcut many asylum seekers used to win residency. Word got out: with a visa to Britain, a pregnant woman could reach Northern Ireland, take a cab across the border, and gain residency by giving birth.

Ms. Gilmartin argues that reports of abuse were exaggerated. But a 2004 referendum changed the rules, reserving citizenship for the children of longtime legal residents. It passed with nearly 80 percent of the vote.

By then, Ireland had about 18,000 mixed families of Irish children and illegal-immigrant parents. Wary of the costs of large-scale deportation, the government ran a one-time legalization program that gave residency to about 95 percent of those parents. The Dimbos were among the 1,000 or so families whose cases were rejected, and they have appealed to the Supreme Court.

Their situation, like that of millions in the United States, pits competing interests: those of children (to live in their country with their parents) against those of states (to enforce borders for the perceived common good).