The Justice Department said in a court document filed Wednesday that CNN's lawsuit against the White House would likely fail, maintaining that President Trump has full discretion over handing out credentials to journalists for access to White House grounds.

"With respect to their First Amendment claim, the president and his staff have absolute discretion over which journalists they grant interviews to, as well as over which journalists they acknowledge at press events," the Justice Department said. "That broad discretion necessarily includes discretion over which journalists receive on-demand access to the White House grounds and special access during White House travel for the purpose of asking questions of the president or his staff."

[Also read: Bob Woodward trashes CNN's lawsuit: We’re taking Trump's 'bait']

The document adds, "No journalist has a First Amendment right to enter the White House and the president need not survive First Amendment scrutiny whenever he exercises his discretion to deny an individual journalist one of the many hundreds of passes granting on-demand access to the White House complex."

It also says that Acosta had his credentials taken because he "was disrupting press proceedings."

CNN sued the Trump administration in federal court on Tuesday for violating the First Amendment when the White House suspended correspondent Jim Acosta's hard press pass, facilitating access to the White House grounds.

"This morning, CNN filed a lawsuit against the Trump administration in DC District Court," CNN's top executive, Jeff Zucker, had said in a statement. "The White House has violated CNN and Jim Acosta's First Amendment rights of freedom of the press and Fifth Amendment rights to due process. We are demanding the immediate return of Jim's White House credential."

The lawsuit names a Secret Service agent "John Doe" as a defendant for allegedly having blocked Acosta's access to the White House grounds.

The White House said last week that it was indefinitely suspending Acosta's credentials after a heated exchange between him and President Trump at a press conference. After Acosta was called on to ask a question, Trump attempted to move on to another reporter, but Acosta initially refused to relinquish the microphone to a White House intern.

The White House has said it will defend itself in court.