President Donald Trump and New York Times publisher A.G. Sulzberger issued very different recollections Sunday of a July 20 meeting the two had at the White House, with the publisher saying he took the president to task for calling the press "the enemy of the people."

The accounts of what had been an off-the-record meeting emerged on Sunday after Trump tweeted about it.

"Spent much time talking about the vast amounts of Fake News being put out by the media & how that Fake News has morphed into phrase, 'Enemy of the People.' Sad!" the president tweeted.

Had a very good and interesting meeting at the White House with A.G. Sulzberger, Publisher of the New York Times. Spent much time talking about the vast amounts of Fake News being put out by the media & how that Fake News has morphed into phrase, “Enemy of the People.” Sad! — Donald J. Trump (@realDonaldTrump) July 29, 2018

Following the tweet, The Times issued a statement saying both sides had agreed not to discuss the meeting, but Trump broke the agreement by tweeting about it. The newspaper said the White House requested that Sulzberger meet with Trump earlier this month, and the publisher went to the White House on July 20 with James Bennett, the editor of the paper's editorial page.

Publisher of the New York Times Arthur Gregg (A.G.) Sulzberger in 2017. Damon Winter / The New York Times via Reuters

Sulzberger and Bennett drew from "detailed notes" that they took, The Times said, so that Sulzberger could accurately respond to Trump's characterization of the conversation.

Sulzberger said in his statement that his principal reason for agreeing to the meeting with Trump was to "raise concerns about the president's deeply troubling anti-press rhetoric" and explain that the president's "language was not just divisive but increasingly dangerous."

"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,'" Sulzberger said. "I warned that this inflammatory language is contributing to a rise in threats against journalists and will lead to violence."

The publisher went on to say that he "repeatedly stressed that this is particularly true abroad, where the president’s rhetoric is being used by some regimes to justify sweeping crackdowns on journalists. I warned that it was putting lives at risk, that it was undermining the democratic ideals of our nation, and that it was eroding one of our country’s greatest exports: a commitment to free speech and a free press.

"Throughout the conversation I emphasized that if President Trump, like previous presidents, was upset with coverage of his administration he was of course free to tell the world," Sulzberger concluded. "I made clear repeatedly that I was not asking for him to soften his attacks on The Times if he felt our coverage was unfair. Instead, I implored him to reconsider his broader attacks on journalism, which I believe are dangerous and harmful to our country."

The White House did not immediately respond to a request for comment on Sulzberger's statement, but the president appeared to provide a retort via a lengthy tweet storm.

Trump claimed that the media has been "driven insane by their Trump Derangement Syndrome" and said that when it reports on government decision making, it put lives at risk. "Very unpatriotic!" he added.

"Freedom of the press also comes with a responsibility to report the news accurately," he tweeted. "90% of media coverage of my Administration is negative, despite the tremendously positive results we are achieving, it's no surprise that confidence in the media is at an all time low!"

The president went on to disparage the Washington Post and the New York Times and said he would "not allow our great country to be sold out by anti-Trump haters in the dying newspaper industry."

Trump has also repeatedly called the media "the enemy of the people" and often derides major media outlets as "fake news." He most recently battered the press last week when speaking at the Veterans of Foreign Wars convention in Kansas City, Missouri.

“Don’t believe the crap you see from these people, the fake news,” Trump said, gesturing toward the members of the press at the event.

“Just remember: What you’re seeing and what you’re reading is not what’s happening,” he added.

The VFW said it was disappointed to hear their members boo the journalists in attendance after Trump's words.

One day after the VFW speech, the Trump administration barred a CNN White House reporter from attending an open press event at the Rose Garden after she asked the president questions about his relationship with his former lawyer Michael Cohen and an invitation he extended to Russian President Vladimir Putin.