Taoiseach Leo Varadkar has said Donald Trump’s criticism of the media was one of the few things he could sympathise with the US president about.

Mr Varadkar made his remarks at a private lunch in New York hosted by the Irish consul general Ciarán Madden for young Irish people working across a range of sectors in the city, including the media, finance and technology.

During the lunch on Monday, the Taoiseach was asked what he thought of the Trump administration and specifically the US president’s attacks on the media.

Mr Varadkar, who was in New York to launch Ireland’s bid to win a seat on the United Nations Security Council, said the media was not interested in the truth but in the story, according to sources familiar with the conversation.

He was particularly critical of the political press. He claimed political journalists were more interested in gossip at Dáil Éireann than in the workings of Government, describing their interest in whispers in the corridors.

The Taoiseach, stressing multiple times that he was biased because the media reported on him, also complained about the large number of journalists covering the Dáil.

Mr Varadkar was challenged on his negative views on the media by guests at the lunch, in what were at times heated exchanges.

US president Donald Trump and Taoiseach Leo Varadkar during the Speaker’s Lunch at Capitol Hill in Washington DC in March. Photograph: Niall Carson/PA Wire

It was pointed out to him that investigative journalism exposed how political profiling firm Cambridge Analytica obtained personal data from social media companies for use in Mr Trump’s presidential campaign, and that the media revealed the sexual assault allegations against film producer Harvey Weinstein.

The Taoiseach believes that a free, fair and balanced press is a cornerstone of our democracy

The Taoiseach replied saying that the print media often focused on technology and social media companies because they were taking away their business and that some investigative journalism in Ireland was incorrect, singling out RTÉ in particular for criticism.

A spokeswoman for the Taoiseach said Mr Varadkar and the guests “shared a wide-ranging discussion”.

“This conversation is now being quoted selectively and out of context,” she said.

“The Taoiseach believes that a free, fair and balanced press is a cornerstone of our democracy.”

One guest said Mr Varadkar’s remarks were “very serious” and that they “came away really quite freaked out”.

“There was shock,” said another source describing the audience reaction to some to his remarks.

Mr Trump has repeatedly attacked the US press, branding news reports he disagrees with as “fake news” and denouncing journalists as the “enemy” of the American people.