The Obama administration sent U.S. troops to Syria recently to attempt to rescue hostages being held by Islamic State militants, including journalist James Foley, but failed to find them, the Pentagon said Wednesday.

Pentagon Press Secretary Rear Admiral John Kirby said in a statement that the mission to rescue the Americans targeted a "captor network" inside the militant group, and included air and ground elements.

"Unfortunately, the mission was not successful because the hostages were not present at the targeted location," Kirby said.

A senior U.S. official also told Fox News the troops apparently just missed the hostages, as the Americans were believed to have been at the site just a few days prior to the mission.

Lisa Monaco, the assistant to the president for Homeland Security and Counterterrorism, said in a statement that the Obama administration chose to authorize the mission because of the "national security team’s assessment that these hostages were in danger with each passing day in ISIL custody."

An investigative source told Fox News that the "top-tier" group's mission included rescuing at least three Americans, including James Foley. The American photojournalist's horrific beheading by Islamic State militants, also known as ISIS or ISIL, was shown on a YouTube video Tuesday night.

Foley's killers are holding another American journalist, Steven Sotloff, who they have also threatened to kill. Islamic State militants are also believed to be holding an American aid worker.

A senior U.S. official told Fox News that the operation, which took place a couple of months ago, included "several dozen" special operators, multiple aircraft and at least one drone.

An additional U.S. military source told Fox News that the mission lasted for a few hours. After the troops did not find the hostages at the location where they were believed held, the troops found information that led them to a second compound.

At this compound, the source said, the troops engaged in a firefight with the militants, killing several including some "significant" members. No U.S. lives were lost but one servicemember sustained minor injuries.

The senior U.S. official said after the militants were killed, the troops swept the area and found the hostages were not there. The troops had hoped to find "several" American hostages, the official said.

NSC Spokesperson Caitlin Hayden said in a statement that the administration had not planned to release details of the operation, out of concern for the safety of the hostages. However, she said, it became clear Wednesday it would be reported in the media and the administration had "no choice but to acknowledge it."

Kirby said the U.S. is committed to rescuing its captive citizens, and "uses the full breadth of our military, intelligence and diplomatic capabilities to bring people home whenever we can."

"In this case, we put the best of the United States military in harm's way to try and bring our citizens home," he said.

Monaco said President Obama "could not be prouder" of the troops who carried out the mission.

"Their effort should serve as another signal to those who would do us harm that the United States will not tolerate the abduction of our people, and will spare no effort to secure the safety of our citizens and to hold their captors accountable," she said.

Foley, a New Hampshire-born journalist who specialized in chronicling life in the world's most dangerous places, disappeared in northern Syria in November 2012 while freelancing for Agence France-Presse and the Boston-based media company GlobalPost.

Foley, who had previously worked in Afghanistan for Stars and Stripes, was not seen or heard from again until the shocking and brutal video, in which his executioner blamed U.S. air strikes on the Islamic State in Iraq, surfaced.

Fox News' Justin Fishel, Catherine Herridge, Jennifer Griffin and The Associated Press contributed to this report.