A federal judge has ordered the Justice Department to investigate how media organizations learned about a criminal probe involving the activities of two pro-Israel lobbyists, who now face trial for illegally disclosing national defense information.

U.S. District Judge T.S. Ellis III ordered the investigation following complaints by defense lawyers that the government failed to follow proper procedures in obtaining and executing a secret warrant for surveillance of lobbyists Steven Rosen and Keith Weissman.

The lobbyists worked for the American Israel Public Affairs Committee until they were fired last year in connection with the investigation.

Media advocacy groups have long been concerned about the government's prosecution of Rosen and Weissman because the statute used to prosecute them — a World War I-era espionage law — could easily be used to prosecute journalists who break news about classified government programs.

Ellis' decision to order an investigation into how CBS News and other media companies learned of the AIPAC probe in late August of 2004 crystallized that concern.

"I find it hard to fathom why the judge needed to file an order seeking confidential sources" in this case, said Lucy Dalglish, executive director for the Arlington-based Reporters Committee for Freedom of the Press. "We're getting into really dangerous territory."

Ellis ordered the inquiry at the same time he rejected the defense argument that such a leak would taint the government's use of a warrant obtained through the secret Foreign Intelligence Surveillance Court.

Defense lawyers have been seeking to suppress evidence obtained from the surveillance; they argued that the leak is proof that the government failed to follow proper procedures.

But Ellis, whose written opinion was made public Tuesday, left the door open for defense lawyers to renew their objections based on the results of the inquiry. The Justice Department was ordered to give Ellis an under-seal report by Sept. 15.

The Espionage Act allows for prosecution of persons who transmit national defense information to those not entitled to receive it. The case against Rosen, of Silver Spring, Md., and Weissman, of Bethesda, Md., is the first to apply the law to lobbyists.

U.S. Attorney General Alberto Gonzales has said he believes journalists can be prosecuted for publishing classified information, and an earlier ruling by Ellis in the AIPAC case on the constitutionality of the Espionage Act also left the door open for prosecutors to charge reporters.

Dalglish said her immediate concern about Ellis' order is that reporters will be pressured to reveal confidential sources. But an official investigation into the media's role in exposing the AIPAC investigation raises the question of whether reporters could face prosecution under the Espionage Act.

"I don't even want to think about what happens" if journalists face prosecution in this case, Dalglish said. "If we get into that territory, I'm moving to Australia."

A CBS News spokesman declined comment Wednesday.

The indictment against Rosen and Weissman alleges that they conspired to obtain classified reports on issues relevant to American policy, including the Al Qaeda terror network; the bombing of the Khobar Towers dormitory in Saudi Arabia, which killed 19 U.S. Air Force personnel; and U.S. policy in Iran.

A former Defense Department official, Lawrence A. Franklin, has already pleaded guilty to providing Rosen and Weissman classified defense information. Franklin was sentenced to more than 12 years in prison.

Franklin said he believed the United States was insufficiently concerned about the threat posed by Iran and hoped that leaking information might eventually provoke the National Security Council to take a different course of action.