In a major speech on Thursday, President Barack Obama defended his administration's policy on investigating leaks regarding information sensitive to national security.

But he conceded that he was "troubled" about its potential effects on stymieing journalism, and said he has ordered Attorney General Eric Holder to conduct a review of the Department of Justice's guidelines.

"As Commander-in Chief, I believe we must keep information secret that protects our operations and our people in the field," Obama said in a speech at the National Defense University. "To do so, we must enforce consequences for those who break the law and breach their commitment to protect classified information. But a free press is also essential for our democracy. I am troubled by the possibility that leak investigations may chill the investigative journalism that holds government accountable."

"Journalists should not be at legal risk for doing their jobs," he continued. "Our focus must be on those who break the law. That is why I have called on Congress to pass a media shield law to guard against government over-reach."

Obama's administration has come under fire in recent weeks for what is seen as an aggressive strategy in prosecuting leakers. Two weeks ago, the Associated Press said the Justice Department had obtained several journalists' phone records. And on Monday, a 2009 case involving Fox News reporter James Rosen earned renewed scrutiny. In a search warrant, an FBI agent labeled Rosen as a "co-conspirator" in leaking the information.

Obama said he has discussed the issues with Holder, who will review the department's guidelines and meet with media organizations addressing their concerns. Obama said Holder is scheduled to report back to him by July 12.