The publisher of The New York Times says the Trump administration was willing to let one of its reporters face arrest in Egypt rather than take action to try to prevent it or let the paper know it was imminent.

The publisher, A.G. Sulzberger, wrote in an opinion-section article published Monday night that "brutal crackdowns" on the news media "are being passively accepted and perhaps even tacitly encouraged by the president of the United States."

Sulzberger pointed to a previously unreported example, writing that the paper received a call two years ago from a U.S. government official warning that one of its foreign correspondents, Declan Walsh, was in danger of being arrested in Egypt.

Sulzberger wrote that while the call itself was not surprising, the government official indicated to The Times that the Trump administration "intended to sit on the information and let the arrest be carried out."

Sulzberger did not identify the official, who he said warned The Times without "the knowledge or permission" of the administration.

"The official feared being punished for even alerting us to the danger," Sulzberger said.

The paper turned to Ireland, Walsh's home country, for help, unwilling to risk asking the U.S. government for assistance. Irish diplomats then went to Walsh's house and escorted him to the airport, where he was able to leave the country for several weeks.

The Sulzberger piece was also delivered as a speech he gave at Brown University on Monday night.

The White House did not respond to a request for comment.

Trump's verbal attacks on the press have been a consistent part of his administration, with the Times often on the receiving end of claims of misreporting and "fake news." Trump has, however, sat for two interviews with the Times during his presidency, most recently in early 2019.

While Trump and his administration have routinely sparred with reporters, they have rarely taken action against them publicly — or in the case of Sulzberger's claim, purposefully not taken action behind the scenes. The White House did temporarily revoke the press pass of Jim Acosta, CNN's chief White House correspondent, in November 2018. More recently, the White House revoked the press pass of Brian Karem, the White House correspondent for Playboy magazine.

The publisher of the New York Times, A.G. Sulzberger, published an important article today about press freedom. He mentioned an incident in which I had to leave Egypt in a rush, fearing arrest, two years ago. Some context on that: https://t.co/pswK66VJJH — Declan Walsh (@declanwalsh) September 24, 2019

Walsh confirmed Sulzberger's account in a series of Tweets on Tuesday. Walsh, now the Cairo bureau chief of the Times, said the trouble began after he published an article about an Italian student who was found dead in Cairo.

Walsh said he received a call from the international editor of The Times just hours after the story was published online with a warning that he faced "imminent arrest." Walsh said he returned to Egypt weeks later and was able to resume working.

Walsh added that he could not say how much danger he faced because little is known about Egypt's security efforts under President Abdel Fattah el-Sisi.

"I don’t know what would have happened if I hadn’t received that timely warning," Walsh wrote on Twitter. "Possibly nothing, and possibly a major problem. The workings of Egypt’s security apparatus are notoriously opaque under Mr. el-Sisi, even to Egypt experts."

Walsh noted that other reporters have faced issues when reporting in Egypt, though he and other reporters recently were able to renew their press cards. He also stressed that Egyptian journalists face far more challenges in reporting in the country.

"Such troubles pale beside Egyptian journalists who have been imprisoned, exiled or killed," Walsh wrote. "The Committee to Protect Journalists says Egypt is among the world’s worst jailers of journalists, alongside Turkey and China. Three were arrested just yesterday."