Federal judges seemed skeptical Monday that President Trump’s press secretary can suspend a reporter’s special-access White House credential without clear notice and advance warning.

The U.S. Court of Appeals for the District of Columbia Circuit was considering a First Amendment lawsuit from journalist Brian Karem, a White House correspondent for Playboy magazine and CNN contributor. Karem sued the president and White House press secretary Stephanie Grisham after his credential was pulled for 30 days following a verbal confrontation in the Rose Garden last summer.

Karem’s lawyer Theodore Boutrous Jr. told the court Monday that “ensuring that the press can vigorously cover this president and the White House is more important than ever” as the nation now confronts the deadly coronavirus.

Justice Department lawyer James Burnham countered that the suspension was justified. Trump administration officials, he said, must have the power to take action if reporters act unprofessionally on the White House grounds.

With the federal courthouse in Washington largely shut down because of concerns about the spread of the coronavirus, the hearing before a three-judge panel was held via teleconference, with public access through live-streamed audio.

The judges were reviewing a September ruling that restored Karem’s White House “hard pass,” which gives journalists largely unfettered access on a daily basis. In that ruling, U.S. District Judge Rudolph Contreras said the press secretary “failed to provide fair notice of the fact that a hard pass could be suspended” as a result of Karem’s actions last summer.

“What is deemed ‘professional’ behavior in the context of a state dinner may be very different from what is considered ‘professional’ behavior during a performance by James Brown,” the judge wrote.

Karem, who has been outspoken in his opposition to Trump, had argued that the suspension violated his constitutional rights of free speech and due process. Grisham said Karem’s behavior was disruptive during an exchange with former White House aide Sebastian Gorka, who is a talk radio host.

Judges Cornelia T.L. Pillard and David Tatel suggested that government officials must articulate specific, unambiguous rules before taking such action when it comes to limiting free speech. Pillard expressed doubt that the court, for instance, could bar a lawyer from the courthouse or suspend the license of an attorney who spoke in a confrontational tone or made an inappropriate joke.

“Of course, the standard has to be announced in advance,” Pillard said.

Judge Sri Srinivasan tested the limits of Karem’s argument, asking his lawyer about a hypothetical journalist who screams and yells using profane language in a way that clearly oversteps professional standards but is not necessarily against the law.

“Is there no conduct by a reporter that could validly be subject to some response?” the judge asked.

Boutrous said there must be explicit rules and notice about the severity of any punishment. He emphasized the “rough and tumble” natural tension between journalists and the public officials they cover.

The government, he said, should not be allowed to strip away journalists’ credentials or muzzle certain reporters when officials dislike their questions. He pointed to Trump’s recent attacks on the media in response to reporters who have asked about the administration’s handling of the coronavirus and how to allay Americans’ concerns about the pandemic.

The incident at issue in Karem’s case followed Trump’s remarks in the Rose Garden after a “summit” of the president’s social media supporters last July. Karem was taunted by some in the audience after Trump did not answer his query. Karem responded that members of the audience were “eager for demonic possession.” He said later that the comment was meant in jest.

Gorka then shouted across the audience at Karem, who invited Gorka to “go outside and have a long conversation.” Although Karem later said he was sincere, Gorka took it as an offer to fight and stormed across the grounds to confront Karem.

Karem’s lawsuit followed a similar case involving CNN’s Jim Acosta, who is also represented by Boutrous. A judge restored Acosta’s credential after the White House suspended it following a heated exchange with the president at a news conference.

Paul Farhi contributed to this report.