WASHINGTON — Journalists from The New York Times and two other news organizations were prohibited from attending a briefing by President Trump’s press secretary on Friday, a highly unusual breach of relations between the White House and its press corps.

Reporters from The Times, CNN and Politico were not allowed to enter the West Wing office of the press secretary, Sean M. Spicer, for the scheduled briefing. Aides to Mr. Spicer allowed in reporters from only a handpicked group of news organizations that, the White House said, had been previously confirmed to attend.

Organizations allowed in 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 Time magazine and The Associated Press, who were set to be allowed in to the briefing, chose not to attend in protest of the White House’s actions.

“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.”

The White House Correspondents’ Association, which represents the press corps, quickly rebuked the White House’s actions.

“The W.H.C.A. board is protesting strongly against how today’s gaggle is being handled by the White House,” the association president, Jeff Mason, said in a statement. “We encourage the organizations that were allowed in to share the material with others in the press corps who were not. The board will be discussing this further with White House staff.”

The White House move came hours after Mr. Trump delivered a slashing broadside against the news media in a speech at the Conservative Political Action Conference.