(Adds Syria denial)
By Missy Ryan and Steve Holland
WASHINGTON/EDGARTOWN, Mass., Aug 21 (Reuters) - U.S. forces tried to rescue journalist James Foley and other American hostages during a secret mission into Syria and exchanged gunfire with Islamic State militants only to discover the captives were not there, officials said on Wednesday.
The mission, authorised by President Barack Obama based on U.S. intelligence, took place earlier this summer, the officials said. The details were disclosed a day after a video surfaced showing a militant beheading 40-year-old Foley.
Syria's government on Thursday denied any such operation had taken place inside its territory, though it does not control large areas where Islamic State operates.
U.S. officials would not say exactly when the operation took place but said it was not in the past couple of weeks.
They said U.S. special forces and other military personnel, backed up by helicopters and planes, dropped into the target zone in Syria and engaged in a firefight with Islamic State militants, several of whom were killed.
The incident appeared to be the first direct ground engagement between the United States and Islamic State militants, seen by Obama as a growing threat in the Middle East.
Lisa Monaco, Obama's top counterterrorism aide, said in a statement that Obama authorized the mission because it was his national security team's assessment that the hostages were in danger with each passing day.
"The U.S. government had what we believed was sufficient intelligence, and when the opportunity presented itself, the president authorized the Department of Defense to move aggressively to recover our citizens. Unfortunately, that mission was ultimately not successful because the hostages were not present," said Monaco.
The National Security Council said later on Wednesday it had never intended to disclose the 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," the NSC statement said. "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 Syrian government dismissed the reports of the raid.
"It did not happen that American war planes attacked terrorist positions in Syria, and that will not happen without the consent of the Syrian government," Syrian Information Minister Omran Zoabi said in remarks published by the Syrian news agency SANA.
Islamic State controls roughly a third of northern and eastern Syria.
OTHER CAPTIVES SOUGHT
Among the hostages sought in the mission was Steven Sotloff, the American journalist who was threatened with beheading in the same video that showed the grisly execution of Foley. Several other captives were also sought, a senior administration official said.
The families of the hostages were informed about the operation, "but only when it was operationally safe to do so," a senior administration official said.
Pentagon spokesman John Kirby said the mission was focused on a "particular captor network" within the Islamic State militant group. He did not provide specifics.
"As we have said repeatedly, the United States government is committed to the safety and well-being of its citizens, particularly those suffering in captivity. 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.
He added: "The United States will not tolerate the abduction of our people, and will work tirelessly to secure the safety of our citizens and to hold their captors accountable." (Additional reporting by Jason Szep and Warren Strobel in Washington and Tom Perry in Beirut; Editing by Peter Cooney, Bernard Orr and Eric Beech)