Defense Secretary Chuck Hagel on Thursday defended the decision to formally acknowledge a failed mission to rescue American journalist James Foley and others held in Syria earlier this year, amid criticism from Republicans over the disclosure.

The White House and Defense Department, in a rare public confirmation of a covert mission, acknowledged late Wednesday that President Obama sent special operations troops to Syria this summer on a secret mission to rescue American hostages held by Islamic State extremists. The mission was not successful.

Hagel echoed White House and State Department claims, though, in saying the only reason they acknowledged the mission was because media outlets already knew about it.

“There were a number of news outlets that were aware of the action, of the raid,” he said Thursday. “It was a decision made by the administration, which we concurred with, to address the mission.”

The statement follows criticism from Republicans, regarding both the formal acknowledgement and the apparent leak beforehand to some members of the press.

Rep. Buck McKeon, R-Calif., chairman of the House Armed Services Committee, on Thursday called for an investigation into the leak.

“Successful or not, such operations are incredibly sensitive, even after they have concluded. Disclosure of these missions puts our troops at risk, reduces the likelihood that future missions will succeed, and risks the lives of hostages and informants alike,” he said in a statement. “While I believe it was unwise for the White House and Department of Defense to formally acknowledge this operation; it is outrageous that someone would be so selfish and short sighted to leak it to the media.”

He urged Hagel and other officials to investigate the matter “immediately and thoroughly.”

The disclosure prompted comparisons to past leaks from the administration, regarding details of the successful Usama bin Laden raid and other operations.

“This is sort of the same thing,” Sen. John McCain, R-Ariz., told Fox News. “One can't help but assume that this is sort of [to try] to help the PR, that they tried to rescue the hostages.”

In some cases, the administration has launched investigations into security leaks -- and has come under criticism from free press and whistleblower groups for aggressively prosecuting the leakers.

In this case, critics voiced concerns that the disclosure jeopardizes other hostages.

Hagel said Thursday “there’s always risks” in any decision they make.

State Department spokeswoman Marie Hard said the administration had no intention of making the mission public, but was forced to do so because reporters were preparing to publish stories about it.

Officials, in disclosing the raid, said earlier that the rescue mission was authorized after intelligence agencies believed they had identified the location inside Syria where the hostages were being held. But the several dozen special operations forces dropped by aircraft into Syria did not find them at that location and engaged in a firefight with Islamic State militants before departing, killing several militants. No Americans died but one sustained a minor injury when an aircraft was hit.

The administration revealed the rescue operation a day after the militants released a video showing the beheading of Foley and threatened to kill a second hostage, Steven Sotloff, if U.S. airstrikes against the militants in Iraq continued.

The disclosure of the rescue mission marks the first time the U.S. has revealed that American military personnel have been on the ground in Syria since a bloody civil war there broke out more than three years ago. Obama has resisted calls to insert the U.S. military in the middle of Syria's war, a cautious approach his critics say has allowed the Islamic State to strengthen there and make gains across the border in Iraq, where the U.S. is now conducting airstrikes.

The Associated Press contributed to this report.