A federal judge has ordered the Defense Department to temporarily halt a requirement that journalists be accompanied by an official escort, another legal setback for the Trump administration’s efforts to restrict media access at the Pentagon. It was not immediately clear whether the order applied only to reporters from The New York Times, which filed the lawsuit, or to the entire press corps.U.S. District Judge Paul L. Friedman in Washington said that policy violated the First Amendment. He issued a preliminary ruling Tuesday barring the requirement while the Times continues its protracted legal battle against the department’s restrictions. While the order’s language suggested the judge’s decision was directed only at the Times, the escort policy itself applies to all journalists. The newspaper in May sued the Defense Department for the second time in five months. The lawsuits have played into an escalating tension between the U.S. media and the Republican administration, both in the public arena and the courts.

The Times hailed Friedman’s ruling. “Today’s well-reasoned decision reaffirms the First Amendment rights of the press to cover the Pentagon without restrictions designed to prevent the public from knowing what the military is doing,” said Charlie Stadtlander, a spokesperson. “The court recognized that the Pentagon’s hastily implemented new policy was a clear violation of the Constitution.”