WASHINGTON — President Trump turned the power of the White House against the news media on Friday, escalating his attacks on journalists as “the enemy of the people” and berating members of his own F.B.I. as “leakers” who he said were putting the nation at risk.

In a speech to the Conservative Political Action Conference, Mr. Trump criticized as “fake news” organizations that publish anonymously sourced reports that reflect poorly on him. And in a series of Twitter posts, he assailed the F.B.I. as a dangerously porous agency, condemning unauthorized revelations of classified information from within its ranks and calling for an immediate hunt for leakers.

Hours after the speech, as if to demonstrate Mr. Trump’s determination to punish reporters whose coverage he dislikes, Sean Spicer, the White House press secretary, barred journalists from The New York Times and several other news organizations from attending his daily briefing, a highly unusual breach of relations between the White House and its press corps.

Mr. Trump’s barrage against the news media continued well into Friday night. “FAKE NEWS media knowingly doesn’t tell the truth,” he wrote on Twitter shortly after 10 p.m., singling out The Times and CNN. “A great danger to our country."

The moves underscored the degree to which Mr. Trump and members of his inner circle are eager to use the prerogatives of the presidency to undercut those who scrutinize him, dismissing negative stories as lies and confining press access at the White House to a few chosen news organizations considered friendly. The Trump White House has also vowed new efforts to punish leakers.

Mr. Trump’s attacks on the press came as the White House pushed back on a report by CNN on Thursday night that a White House official had asked the F.B.I. to rebut a New York Times article last week detailing contacts between Mr. Trump’s associates and Russian intelligence officials. The report asserted that a senior White House official had called top leaders at the F.B.I. to request that they contact reporters to dispute the Times’s account.

“The fake news doesn’t tell the truth,” Mr. Trump said to the delight of the conservatives packed into the main ballroom at the Gaylord National Resort and Convention Center just south of Washington. “It doesn’t represent the people, it doesn’t and never will represent the people, and we’re going to do something about it.”

In the West Wing less than three hours later, the consequences were becoming clear. Mr. Spicer told a handpicked group of reporters in a briefing in his spacious office that the White House would relentlessly counter coverage it considered inaccurate.

“We’re going to aggressively push back,” he said, according to a recording of the session provided by a reporter who was allowed to attend. “We’re just not going to sit back and let, you know, false narratives, false stories, inaccurate facts get out there.”

Reporters from The Times, BuzzFeed News, CNN, The Los Angeles Times, Politico, the BBC and The Huffington Post were among those shut out of the briefing. Aides to Mr. Spicer admitted only reporters from a group of news organizations that, the White House said, had been previously confirmed.

Those organizations included Breitbart News, the One America News Network and The Washington Times, all with conservative leanings. Journalists from ABC, CBS, The Wall Street Journal, Bloomberg and Fox News also attended.

Reporters from The Associated Press and Time magazine, who were set to be allowed in, chose not to attend the briefing in protest of the White House’s actions. The Washington Post did not send a reporter to the session.

“Nothing like this has ever happened at the White House in our long history of covering multiple administrations of different parties,” Dean Baquet, the executive editor of The Times, said in a statement. “We strongly protest the exclusion of The New York Times and the other news organizations. Free media access to a transparent government is obviously of crucial national interest.”

Marty Baron, the Post’s editor, called Mr. Spicer’s decision to exclude some news organizations from a scheduled briefing “appalling.”

“This is an undemocratic path that the administration is traveling,” Mr. Baron said. “There is nothing to be gained from the White House restricting the public’s access to information.”

The White House played down the drama surrounding Friday’s briefing.

“We invited the pool, so everyone was represented,” Sarah Huckabee Sanders, the deputy White House press secretary, said in an email Friday afternoon, referring to the small group of reporters on hand at the White House each day to follow the president and send reports to the broader press corps. “We decided to add a couple of additional people beyond the pool. Nothing more than that.”

The White House Correspondents’ Association, which represents the press corps, also protested the decision. But Jeff Mason, the organization’s president, pointed out that the White House had provided near-daily briefings and accepted questions from a variety of news outlets since Mr. Trump took office.

“We’re not happy with how things went today,” Mr. Mason said in an interview. “But it’s important to keep in mind the context of how things have gone up until now.” He added: “I don’t think that people should rush to judgment to suggest that this is the start of a big crackdown on media access.”

Still, the Committee to Protect Journalists, which typically advocates press rights in countries with despotic regimes, issued an alarmed statement on Friday about Mr. Trump’s escalating language.

“It is not the job of political leaders to determine how journalists should conduct their work, and sets a terrible example for the rest of the world,” said the group’s executive director, Joel Simon. “The U.S. should be promoting press freedom and access to information.”

Mr. Trump, in his attack on the news media at the conservative gathering, complained at length about the use of anonymous sources in news stories, charging that some reporters were fabricating unnamed sources to level unfair charges against him.

“They shouldn’t be allowed to use sources unless they use somebody’s name,” Mr. Trump said. “Let their name be put out there.”

At another point, he said, “A few days ago, I called the fake news the enemy of the people because they have no sources — they just make it up.” He added that his “enemy of the people” label applied only to “dishonest” reporters and editors.

Those comments came shortly after his own aides had held a briefing for the White House press pool on the condition of anonymity to deny CNN’s story suggesting there had been improper contact between the White House and the F.B.I. regarding the Times article on Russian contacts.

Later, in the briefing from which the Times was excluded, Mr. Spicer said that it was top F.B.I. officials — first Andrew G. McCabe, the deputy director, and later James B. Comey, the director — who approached Reince Priebus, the White House chief of staff, the day after the article appeared to say that it was false.

Mr. Priebus then asked the two F.B.I. officials what they could do to rebut it publicly. They apologized and said they were unable to issue a statement or otherwise comment on the matter, Mr. Spicer said.

“They came to us and said the story is not true. We said, ‘Great, could you tell people that?’” Mr. Spicer said, describing the discussions between Mr. Priebus and F.B.I. officials.

The F.B.I. on Friday declined to provide its account of those conversations. On Thursday night an F.B.I. official said that the White House had asked last week for the bureau’s help disputing the article, and that senior F.B.I. officials had rejected the request, citing the investigation into Russian efforts to affect the election.

The article reported that current and former American officials said that phone records and intercepted calls showed that members of Mr. Trump’s 2016 presidential campaign and other Trump associates had repeated contacts with senior Russian intelligence officials in the year before the election. The intercepts alarmed American intelligence and law enforcement agencies, in part because of the amount of contact that was occurring while Mr. Trump was speaking glowingly about the Russian president, Vladimir V. Putin.

Last week the White House declined to comment on the Times article and referred reporters back to Mr. Spicer’s previous assertions that Mr. Trump’s campaign had no contact with the Russian government.

Mr. Baquet said on Friday that The Times “had numerous sources confirming this story.”

“Attacking it does not make it less true,” Mr. Baquet added.

Mr. Spicer’s small-group Friday session, known as a gaggle, was scheduled as an off-camera event, less formal than his usual briefings that are carried live on cable news. But past administrations have not selected outlets that can attend such sessions.

Representatives of the barred news organizations made clear that they believed the White House’s actions were punitive.

“Apparently this is how they retaliate when you report facts they don’t like,” CNN said in a statement.

Tensions always emerge between an administration and the reporters who cover it, and it is not unusual for a White House to single out groups of journalists for special briefings outside of the daily on-camera question-and-answer session. The Obama White House was harshly criticized by members of the press corps after it tried to exclude Fox News from interviews with top administration officials.

But press relations in the Trump White House have taken on a tinderbox dynamic, with journalists and press aides highly suspicious of each other’s motives.

“The grass is dry on both sides,” said Ari Fleischer, who was press secretary to George W. Bush, “so it only takes a very small match to light it on fire.”

Our editors found this article on this site using Google and regenerated it for our readers.