Taoiseach Enda Kenny’s decision to invite US president Donald Trump to Ireland may have stoked controversy at home but in sections of the US media his visit to the White House was presented as a small country standing up for the rights of immigrants.

An article on page 16 of The New York Times appeared under the headline: “Irish Premier uses St Patrick’s Day Ritual to Lecture Trump on Immigration”.

The piece states that, while the visit “should have been a delightful distraction for Mr Trump,” instead the US president found himself in a roomful of “kelly-green-clad lawmakers” in the Capitol being lectured by Mr Kenny about the virtues of America’s immigrant legacy and the contributions that immigrants had made to the country.

The article notes that Mr Kenny did not refer to Mr Trump’s travel ban, but instead stuck to the issue that has “long preoccupied Irish officials” - the estimated 50,000 Irish who are living in the United States illegally. It stated that, Mr Kenny’s call for the issue to be sorted marked a “somber moment during a ritual that is normally as convivial and rancor-free as any in Washington”, noting how Mr Kenny choked up momentarily.

Happy Lá Fheile Phadraig to all of my great Irish friends! — Donald J. Trump (@realDonaldTrump) March 17, 2017

The Washington Post was more hard-hitting. Its article described how the day began with a “cringe-worthy mildly offensive Irish cliché” when vice president Mike Pence greeted guests at the annual St Patrick’s day breakfast with the words “top of the morning”.

It reported that Mr Kenny’s visit had been shrouded in controversy even before the visit with almost 40,000 people signing the petition “Shamrock for Trump: Not in my Name” demanding that Mr Kenny cancel the trip.

“As the day went on, the awkward and at times embarrassing Irish cultural references from Washington politicians were nearly as bountiful as their green neck ties,” the piece continued, noting that the origins of the “Irish proverb” quoted by President Trump were unclear, with some suggesting that it was taken from a poem by Nigerian poet Albashir Adam Alhassan.

With the decision by two US federal courts to block Mr Trump’s revised travel ban halting immigration from six Muslim-majority countries dominating the news-cycle on Thursday, most news sites focused on the Taoiseach’s comments on immigration and the plight of Irish immigrants living in the United States.

The Boston Globe ran an article from Associated Press under the headline: “Ireland’s leader pushes Trump to help Irish living in US illegally.” It noted that the Taoiseach urged Donald Trump to help Irish people living in the United States illegally, saying the immigrants just want to ‘’make America great”.

It also noted that the Taoiseach sought to impress upon Mr Trump the difficulties Ireland will face as a result of Britain’s decision to leave the European Union, noting that Mr Trump supported the British decision to leave the 28-country bloc, saying earlier this year that leaving would “end up being a great thing”.

The Taoiseach travelled to New York on Friday morning where he is due to march in the St Patrick’s Day Parade, attend Ireland Day at Bloomberg headquarters and attend a Tourism Ireland event at the World Trade Centre.