“I told him that although the phrase ‘fake news’ is untrue and harmful, I am far more concerned about his labeling journalists ‘the enemy of the people,’” Mr. Sulzberger continued. “I warned that this inflammatory language is contributing to a rise in threats against journalists and will lead to violence.”

This is particularly true overseas, Mr. Sulzberger said, where governments are using Mr. Trump’s words as a pretext to crack down on journalists. He said he warned the president that his attacks were “putting lives at risk” and “undermining the democratic ideals of our nation.”

Mr. Sulzberger’s lengthy, bluntly worded rebuttal was a striking rejoinder to the president by the 37-year-old publisher of a paper with which Mr. Trump has had a long, complicated relationship. And it apparently touched a nerve: The president fired off a series of angry tweets in the afternoon, accusing newspapers of being unpatriotic.