Evan Vucci, Associated Press
Cabinet members, from left, Attorney General Eric Holder, Defense Secretary Leon Panetta, Treasury Secretary Timothy Geithner listen to President Barack Obama's the State of the Union address on Capitol Hill in Washington, Tuesday, Jan. 24, 2012.

WASHINGTON — "Good job tonight," President Barack Obama told his defense chief as he arrived for his annual State of the Union message.

Unknown to a global television audience watching Tuesday night's speech moments later, a hostage rescue operation had just played out half a world away with an elite Navy SEAL team's rescue of two hostages in Somalia, one of them an American. It was the same SEAL unit that killed al-Qaida leader Osama bin Laden, a U.S. official said Wednesday.

Publicly, Obama did not mention the raid during his speech, though microphones picked up his congratulation to Defense Secretary Leon Panetta as he entered the House chamber.

Obama had learned shortly before that the operation to rescue American aid worker Jessica Buchanan and Poul Hagen Thisted of Denmark had been successful. Immediately after the speech, Obama returned to the White House to inform Buchanan's father that she was safe and "on her way home," according to a White House statement.

It was a dramatic bookend to the pomp and ceremony of one of Washington's most elaborate rituals — the State of the Union address. During his speech, the president did refer to another successful military operation — the May 2011 killing of Osama bin Laden by Navy SEAL Team 6.

The hostage rescue in Somalia was carried out by the same SEAL unit behind the bin Laden operation, a U.S. official said, speaking on condition of anonymity to discuss the operation. The unit is the Naval Special Warfare Development Group, also known as SEAL Team 6. The members of the unit who carried out the rescue operation were not the same as those who killed bin Laden, the U.S. official said.

In a predawn White House statement, Obama praised U.S. Special Operations Forces who rescued Buchanan and Thisted, who had been kidnapped at gunpoint by Somali pirates in October.

"As Commander-in-Chief, I could not be prouder of the troops who carried out this mission, and the dedicated professionals who supported their efforts," Obama said in a statement.

U.S. officials speaking on condition of anonymity to discuss the top secret operation, said the SEAL team parachuted into the area and got to the rescue site on foot.

Obama was briefed on developments throughout the day, the White House said.

Panetta, in a separate statement, said Buchanan and Hagen Thisted "have been transported to a safe location where we will evaluate their health and make arrangements for them to return home." He said the two hostages were not harmed during the operation, and no U.S. troops were killed or injured.

"This was a team effort and required close coordination, especially between the Department of Defense and our colleagues in the Federal Bureau of Investigation," Panetta said.

On NBC's "Today," Vice President Joe Biden said the U.S. decided to move after determining that Buchanan's health "was beginning to decline."

"We wanted to act," Biden said.

Obama approved the mission Monday. On Tuesday, Obama's top counterterrorism adviser, John Brennan, gave the president half a dozen updates on the rescue operation.

About two hours before Obama was scheduled to begin delivering his State of the Union address, Brennan told him Buchanan and Thisted were safe and in U.S. hands.

After delivering his address, Obama called Buchanan's father. In his statement Wednesday, Obama said he told John Buchanan "that all Americans have Jessica in our thoughts and prayers, and give thanks that she will soon be reunited with her family."

"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 bring their captors to justice," Obama said. "This is yet another message to the world that the United States of America will stand strongly against any threats to our people."

Biden had high praise for the special forces. "It takes your breath away, their capacity and their bravery," he said on ABC's "Good Morning America." ''These guys and women are amazing."

Associated Press writers Julie Pace and Robert Burns contributed to this report.