WASHINGTON — U.S. ground troops attempted but failed to rescue several American hostages in Syria in early July, the Pentagon announced Wednesday.

"This operation involved air and ground components and was focused on a particular captor network within" territory controlled by the militant group Islamic State, Rear Adm. John Kirby, Pentagon press secretary, said in a statement. "Unfortunately, the mission was not successful because the hostages were not present at the targeted location."

Journalist James Foley was one of those hostages included in the attempted rescue mission, a senior administration official said on condition of anonymity because Foley's identity was not authorized to be said publicly.

Foley was executed by the members of the Islamic State on Tuesday. The group displayed the execution by beheading in a video posted online.

In this November 2012 photo posted on the website freejamesfoley.org, journalist James Foley covers the civil war in Aleppo, Syria. (Photo: AP)

Buttons in support of James Foley are displayed during a panel discussion about the importance and dangers of reporting on world conflicts at a Free James Foley event in Boston. (Photo: Don Emmert, AFP/Getty Images)

John, center, and Diane Foley, left, parents of James Foley, listen to a panel discussion about the importance and dangers of reporting on world conflicts at a Free James Foley event in Boston in 2013. (Photo: Don Emmert, AFP/Getty Images)

Freed journalists Nigel Chandler, left, of Britain, Manu Brabo of Spain, James Foley of the U.S. and his compatriot Clare Morgana Gillis, right, arrive at Rixos Hotel in Tripoli, Libya, on May 18, 2011, following their release. They had disappeared April 4 while covering the conflict in Libya. (Photo: Mahmud Turkia, AFP/Getty Images)

John Foley, left, and his wife Diane, back to camera, talk with supporters July 25, 2013, in Rochester, N.H. after a moment of silence for James Foley, their missing son. Foley, 39, was last seen Nov. 22, 2012, in northwest Syria. (Photo: Jim Cole, AP)

Like this topic? You may also like these photo galleries:

The National Security Council confirmed to USA TODAY on Wednesday that it chose to go public with the announcement because it was about to be reported publicly by the media.

The NSC released this statement on Wednesday that it attributed to spokeswoman Caitlin Hayden: "We never intended to disclose this operation. An overriding concern for the safety of the hostages and for operational security made it imperative that we preserve as much secrecy as possible. We only went public today when it was clear a number of media outlets were preparing to report on the operation and that we would have no choice but to acknowledge it."

The rescue attempt involved U.S. special operations forces who killed several militants during the raid, according to a Defense Department official briefed on the rescue attempt but not authorized to speak about details on the record. One U.S. pilot suffered minor wounds during the mission.

The rescue attempt of Americans held hostage by the Islamic State occurred earlier this summer, according to a statement from Lisa Monaco, assistant to the president for Homeland Security and Counterterrorism.

President Obama "authorized action at this time because it was the national security team's assessment that these hostages were in danger with each passing day in (Islamic State) custody," Monaco said.