Enda Kenny is receiving international acclaim for lecturing US President Donald Trump on the value of immigration, but his fine words ring hollow when his Government continues to warehouse asylum applicants in institutions for years.

The Taoiseach should give his speech writers a raise. Having gone to the US a busted flush, after narrowly avoiding a motion of no confidence from his own parliamentary party members, he has returned a star.

In a perfectly pitched speech, which framed St Patrick as the patron saint of immigration, Mr Kenny spoke emotively about the role of generations of Irish emigrants in making America great again.

"For decades, before Lady Liberty lifted her lamp, we were the wretched refuse on the teeming shore. We believed in the shelter of America, in the compassion of America, in the opportunity of America. We came and became Americans," he said.

It was quite the feat - managing to imbue the misty-eyed paddywhackery of the annual shamrock ceremony in Washington with some actual gravitas. An effusive piece in 'The New York Times' said Mr Kenny had "lectured" the American president on the "virtues of America's immigrant legacy and the contributions that immigrants had made to the country".

He didn't stop there. Imploring Mr Trump to look favourably on the plight of the 50,000 "undocumented" Irish emigrants in the US, Mr Kenny said "all they want is the opportunity to be free".

"It would remove a burden of so many that they could now stand in the light and say, 'now I'm free to contribute to America as I know I can'. That's what people want," he said.

A noble sentiment indeed, until, of course, one considers the shameless hypocrisy of the man making it.

While Mr Kenny went to America seeking special favours for illegal Irish immigrants, thousands of people seeking asylum are languishing indefinitely in institutions in this country.

They too just want an opportunity to be free, and to contribute to this State, but instead they are crammed into centres and forced to subsist on €19.10 a week while they wait for their applications to be finalised.

When it was established in 2000, the then-government estimated that asylum seekers would only remain within the direct provision system for six months. In reality, 70pc of asylum seekers have been living in these centres for more than three years, while the average length of stay is more than four years.

The Irish Refugee Council has condemned 'direct provision' as "an example of a government policy which has not only bred discrimination, social exclusion, enforced poverty and neglect, but has placed children at a real risk".

A former special rapporteur on child protection, Geoffrey Shannon, warned there was a "real risk of child abuse in direct provision where single-parent families are required to share with strangers and where families with teenage children of the opposite gender are required to share a room".

He wasn't speaking hypothetically. In a 2012 report, he documented the case of a 14-year-old girl in a direct provision centre who became pregnant when she was raped by another resident.

The Rape Crisis Centre, in yet another damning report, found "domestic violence, sexual harassment, sexual assault and recruitment for prostitution and trafficking" were the lived experiences of many asylum seekers in Ireland. This contention was supported by an investigation by RTÉ reporter Brian O'Connell in 2015, in which he interviewed women living in direct provision who had resorted to prostitution, as they had no other means of earning money.

At the time, Justice Minister Frances Fitzgerald denied any knowledge of women and girls in direct provision engaging in prostitution, saying: "We have no reports in relation to that, to date."

However, Ruhama, a support service for women affected by prostitution, said that it sent reports of migrant women being solicited for sex, and engaging in prostitution, to the minister's department as far back as 2007 and 2008.

If the Department of Justice had no knowledge of this kind of behaviour, it was not because it had not been told. It was because it was not listening. As recently as last month, Mr Justice Gerard Hogan delivered a judgment in the Court of Appeal that derided the system as "dysfunctional" and said "endemic delays blight the lives of those forced to wait indefinitely in our system of direct provision".

Given all of this - the myriad reports that have highlighted the gross iniquities of our own asylum system - it really took some neck for Mr Kenny to cast himself as some kind of enlightened civil rights evangelist during his encounter with Donald Trump.

Worse, there is a danger that people will lap it up.

There have been some improvements to the direct provision system in recent years - the announcement that the remit of the Ombudsman and Ombudsman for Children will soon be extended to direct provision centres among the most positive - but its inherent iniquity remains untouched.

The State has said it will try to ensure that applications are dealt with more speedily, but it has made no guarantees, and won't even entertain the notion of asylum seekers being allowed to work, and support themselves to live in local communities, while their cases are being processed.

Today, as a country, we are struggling to comprehend the cruelty, masquerading as piety, which resulted in tens of thousands of women and children being caged in mother and baby homes.

Future generations will be similarly aghast at the callousness of a society that presided over the exclusion and isolation of vulnerable people in direct provision centres, even as they went to America to crow about their humanity.