A federal judge in Washington, D.C., issued a temporary restraining order on Thursday, ordering the White House to restore access to CNN, MS NOW and Politico reporters who had been banned by President Trump.

In his 8-page ruling, U.S. District Judge Timothy Kelly, a Trump appointee, ordered the White House to "immediately return, reinstate, and restore" access to the news outlets for a period of 14 days, saying their lawsuit against the president was likely to succeed in showing that their press passes were revoked without due process.

But hours after the ruling was issued, some reporters from CNN, MS NOW and Politico were still denied access to the White House grounds, and the outlets requested an immediate hearing.

"This morning journalists from each of CNN, MS NOW, and POLITICO attempted to enter the White House and were turned away, and Secret Service agents confiscated the hard pass of journalists whose hard passes had not previously been confiscated," the outlets said in a court filing early Thursday. I

Kelly ordered the Trump administration to respond to the accusations of non-compliance by midday on Thursday. It was not immediately clear when a hearing might take place.

MS Now White House correspondent Laura Barrón-López reports from a street corner near the White House on Thursday.

Trump announced the ban on reporters from CNN, MS NOW and Politico on Sept. 18, saying the outlets "constantly write or report fiction or lies" about his administration.

The three news organizations filed a lawsuit in federal court Monday, alleging that Trump had violated their First Amendment rights by retaliating against them for coverage he didn't like. 

"President Trump has said in no uncertain terms that he would prefer only to be covered by news organizations and reporters who praise his administration," the complaint stated. "But the Constitution does not allow a president or any other government official to deprive the press of their First Amendment rights and liberty and property interests with no notice or process based solely on his dislike of the content of their reporting." 

The organizations argued that their reporters were not afforded due process and are asking a federal judge to quickly rule that Trump's ban is unconstitutional. The filing cites a 1977 ruling by the D.C. Circuit Court of Appeals, which found that the White House cannot arbitrarily deny a journalist a press pass without due process.

"This ban could not be a more direct assault on the First Amendment nor a more blatant violation of our most fundamental constitutional principles," the filing stated.

Dozens of media organizations signed an amicus brief in support of CNN, MS NOW and Politico.

The Trump administration filed a response to the suit on Tuesday, arguing that "access to the White House is a privilege — not a right."

It said that Trump concluded that the three news outlets violated "the standards of professionalism and decorum expected of those given access to the White House Complex, including by trafficking in verifiable falsehoods about national security and other issues, and publishing sensitive or classified information." 

Trump had previously indicated that he would appeal any ruling against him.

A view of the White House Briefing Room on Sept. 19.

On Friday afternoon, Trump announced the ban in a Truth Social post, saying it was not prompted by any particular stories but was "a result of their constant 'reporting' FAKE NEWS!"

"It's really just cumulative stories over the last few years. You get sick of it," Trump said at an Oval Office event an hour later while explaining his decision to enact "the ban on the free press."

"There's something wrong with a country that can allow people to write purposely negative stories," the president said. "If they want to write them, that's fine, but I don't have to let them into my, into the people's house."

According to CNN, Trump's close aide Natalie Harp showed him clips of media coverage shortly before he announced the ban.

On Saturday, reporters from CNN, MS NOW and Politico were turned away from the White House by members of the Secret Service and had their credentials — so-called hard passes needed for access — confiscated.

The journalists — CNN's Betsy Klein, MS NOW's Akayla Gardner and Politico's Cheyenne Haslett — are listed as plaintiffs in the court filing.

MS NOW's Akayla Gardner, CNN's Betsy Klein and Politico's Cheyenne Haslett are seen near the White House after all were denied entry on Sept. 19.

The news outlets are longstanding members of the White House press pool that provides rotating coverage of the administration and travels with the president. 

The White House Correspondents' Association condemned the move, saying it violates the First Amendment.

"The American people, through a free and independent press, must be able to scrutinize those elected to power, regardless of whether government officials view it favorably," Jacqui Heinrich, Fox News senior White House correspondent and WHCA president, said in a statement. "That's why courts have repeatedly held that once the White House provides access to journalists, it cannot deny that access arbitrarily or based on the content of their reporting." 

In response to the ban, four major TV networks — ABC, CBS, NBC and Fox News — refused to participate in the White House pool, the rotating group of reporters, photographers and videographers that document the president's public events. CNN had been scheduled to serve as the television pool on Monday, including his trip to New York City for the United Nations General Assembly.

As a result, Trump was largely inaudible during a ribbon-cutting ceremony for the White House's new helipad on Monday, where he gave a brief speech without the microphone that the pool would typically provide. 

Speaking with reporters after arriving at the United Nations on Tuesday, Trump appeared to take issue with the presence of CNN's Kaitlan Collins, saying he was "surprised" to see the journalist.

"You should not be here covering me," Trump said. "You said you weren't going to be covering me."

In a post on X, Collins said she was credentialed by the United Nations to cover the General Assembly.

CNN is scheduled to serve as the television pool Chinese President President Xi Jinping's visit to the White House on Thursday night.

Secretary of State Marco Rubio defended the ban in an appearance on NBC's Today show earlier Tuesday.

"We're not closing CNN," Rubio said. "There aren't a bunch of police officers or soldiers kicking down the doors of MSNBC or MS NOW, whatever it's called, and arresting people and unplugging it from the grid. They're just not allowed to work from the workspace at the White House."

A White House staff member reaches for the microphone held by CNN's Jim Acosta as he questions President Donald Trump during a news conference on Nov. 7, 2018.

U.S. presidents throughout history have complained about negative coverage of their administrations. In 2009, the Obama administration sought to exclude Fox News from a series of interviews with a Treasury Department official in the wake of the 2008 financial crisis, but backed down when the other major television networks objected.

During his first term in office, Trump continued the Oval Office's adversarial relationship with the media, referring to the press as "fake news" and the "enemy of the people." It has escalated in his second.

In 2018, Trump administration officials revoked the press pass of then-CNN White House correspondent Jim Acosta after they said that he had interrupted the president during a news conference. The network sued, and Kelly, the D.C. federal judge, ordered Acosta's credentials restored.

A similar situation played out the following year when the White House revoked Playboy correspondent Brian Karem's press pass over a verbal argument between Karem and Sebastian Gorka, a former White House aide, at a Rose Garden event. A different federal judge ordered the White House to restore Karem's pass.

Last year, Trump barred Associated Press journalists from the Oval Office, Air Force One and some official events after the news service declined to refer to the Gulf of Mexico by Trump's preferred name, the Gulf of America. The AP filed suit and the case is ongoing.

In December, the Pentagon announced new restraints on journalists, who were asked to sign a pledge affirming that they would not gather unauthorized information for publication. New organizations refused to sign the pledge, and temporarily lost their credentials. The New York Times filed suit, and in March, a federal judge ruled that the Pentagon restrictions were unconstitutional. The Pentagon restored press credentials to the journalists who refused to sign the pledge, while imposing a new rule that they can only enter the Pentagon with an escort. The Times again filed suit and the case is ongoing.

The White House has also made attempts to circumvent traditional broadcast television models. On Monday night, it launched a YouTube stream branded "TRUMP TV: The Essentials Station" that the White House said would showcase "the Trump Administration's biggest moments all in one place." 

Since its launch, Trump TV has featured a rotating stream of Trump's speeches, Oval Office gatherings and other White House events from throughout the president's second term. 

The first video showed Trump's remarks on July 3 at Mount Rushmore.

In March, the White House launched an official app that is now the No. 2 most popular news app in the App Store. "The American people are not waiting on those cameras," the White House said in a press release touting the app's ranking. "They are going straight to the Presidency."

In his first event without a network TV pool on Monday, Trump unveiled the White House's new helipad before departing for New York. His remarks were nearly inaudible on the White House video feed. Joe Reberkenny, a White House correspondent for the Washington Blade who was serving as the in-town pool reporter, said he couldn't hear Trump "over the sound of the helicopter."