The government withdrew subpoenas on Thursday that would have required three New York Times reporters to identify their sources for articles about President Donald Trump's Qatari-gifted Air Force One jet, after a federal judge criticized the government's legal approach.

The withdrawals followed a contentious hearing in U.S. District Court where Judge Arun Subramanian expressed frustration with government attorneys over their handling of the case. The move comes as the Trump administration has been aggressively pursuing news organizations and attempting to crack down on government leaks.

This represents the latest instance of the Justice Department backing away from efforts to compel journalists to name their sources before a grand jury. The administration recently withdrew similar subpoenas seeking testimony from journalists at The Washington Post and The Wall Street Journal.

The judge stated he would have granted the Times' request to reject the subpoenas because regulations governing journalist subpoenas require them to be a last resort. "Subpoenas are the last step, not the first step, but the last step," Subramanian said, citing First Amendment protections. He said the government had turned the law "on its head."

The judge noted that before issuing subpoenas to journalists, the government must show it cannot obtain needed information elsewhere. "Subpoenas are not the first thing you do, they are the last thing you do," He said, becoming increasingly testy in questioning government lawyers about their investigative steps.

The judge indicated that in a civil proceeding, he would normally ask parties to show cause why sanctions should not be issued.

The hearing was public despite Trump administration efforts to keep the litigation secret. Times officials, including the paper's managing editor and general counsel, attended the proceedings.

The subpoenas also sought phone records of several Times journalists and some of their relatives, including one reporter's mother and two journalists' spouses - raising questions about the scope of the Justice Department's investigation.

The articles in question, published July 8 and July 9, reported that Trump used an older Air Force One model to leave a NATO summit in Turkey earlier this month, citing anonymous sources who said the Secret Service had urged the switch because the newer jet, a $400 million retrofit of a Qatari gift, lacked some advanced security features including antimissile capabilities. Trump rejected the security concerns on social media.

The Times argued the phone records requests sought information dating from January 1 - long before publication - suggesting the government aimed to "forage for information about the Journalists' source relationships more broadly." The newspaper claimed the government acted in "bad faith" And ignored its own protocols by not providing advance notice and demanding information "without first conducting any serious investigation."

The Justice Department maintained that "reporters are not the targets, those leaking classified information are" And said it had complied with regulations and taken investigative steps before seeking the subpoenas.