A New York Times reporter based in Egypt has revealed how he got help from Ireland following a warning of his imminent arrest.
The paper has claimed the Trump administration refused to intervene.
The story was revealed by A G Sulzberger, the publisher of the US newspaper.
In a speech at Brown University and later published by the paper, Mr Sulzberger explained how the US government has traditionally been a "critical safety net" for reporters in dangerous areas.
However, he said the situation has "dramatically changed" in recent years amid a "relentless campaign is targeting journalists".
He explained that two years ago a US government official warned the newspaper of the imminent arrest of their reporter Declan Walsh, who was based in Egypt.
Mr Walsh was born and raised in Ireland and is an Irish citizen.
He is currently the New York Times' Cairo bureau chief.
Mr Sulzberger explained: "This particular call took a surprising and distressing turn. We learned the official was passing along this warning without the knowledge or permission of the Trump administration.
"Rather than trying to stop the Egyptian government or assist the reporter, the official believed, the Trump administration intended to sit on the information and let the arrest be carried out."
He suggested the official in question "feared being punished" for alerting the paper of the situation.
The publisher added: "Unable to count on our own government to prevent the arrest or help free Declan if he were imprisoned, we turned to his native country, Ireland, for help.
"Within an hour, Irish diplomats traveled to his house and safely escorted him to the airport before Egyptian forces could detain him."
Mr Sulzberger added that they "hate to imagine" what would have happened had the unnamed official not raised the alarm and "risked their career".
Mr Walsh has since verified this in a Twitter thread.
He explained how after he published a story in August 2017 about Giulio Regeni, an Italian student found dead in Cairo, his editor "called with a warning from an American official that I faced imminent arrest."
The incident occurred in August 2017 after @NYTmag published my story about Giulio Regeni, an Italian student found dead in Cairo. Italy accuses Egypt of involvement, and Egypt denies. It's a sensitive issue. https://t.co/MwFzxsHSic
— Declan Walsh (@declanwalsh) September 24, 2019
"He advised me to get out immediately. I called the US embassy, where a press officer directed me to the Irish embassy", Mr Walsh wrote.
"The Irish ambassador sent a diplomat to my apartment who arrived in an hour.
"The diplomat drove to Cairo airport where I took the first available flight to Europe.
"Weeks later, I returned to Egypt unhindered and resumed work."
He added: "I don’t know what would have happened if I hadn’t received that timely warning.
"Possibly nothing, and possibly a major problem.
"The workings of Egypt’s security apparatus are notoriously opaque under [Egyptian President] Mr el-Sisi, even to Egypt experts."
He also said the bureau in Cairo "has faced difficulties in Egypt with government accreditation, legal threats, and attacks in the local press."
He pointed to a case where a reporter for the Times of London was expelled last year.
"But the authorities recently renewed my press card, as well as that of other foreign reporters, which hopefully is a sign of positive change", he added.
Additional reporting: Jack Quann