A dispute over the press credentials of CNN’s chief White House correspondent has escalated into a potentially significant legal showdown over journalists’ rights.

The cable network and the Trump administration faced aggressive questions from a federal judge in Washington on Wednesday, as lawyers argued over a lawsuit brought by CNN to reinstate the press pass of the correspondent, Jim Acosta. His credentials were revoked last week after a testy exchange with President Trump.

Much of the debate revolved around whether the White House had retaliated against Mr. Acosta for his critical coverage, which CNN said amounted to a violation of his First Amendment and due process rights. Lawyers for the Justice Department argued that Mr. Trump had discretion to choose the reporters who cover his events at the White House.

The judge, Timothy J. Kelly, who was appointed by Mr. Trump last year, said he would announce a decision on whether to reinstate Mr. Acosta’s credential on Thursday afternoon.