WASHINGTON (AP) — President Barack Obama said Saturday he authorized the attempt to rescue American Luke Somers in Yemen because the U.S. had information that the photojournalist's life was in imminent danger.

Shortly before the White House statement, Yemen's national security chief said militants had planned to kill Somers on Saturday. On Thursday, al-Qaida in the Arabian Peninsula posted a video online threatening to kill Somers.

Authorities said Somers, who was kidnapped in September 2013, and a South African teacher, Pierre Korkie, died in the rescue operation that Obama said was conducted by U.S. forces in partnership with Yemen's government.

The president said he "strongly condemns the barbaric murder of Luke Somers at the hands of al-Qaida terrorists" and reaffirmed that the U.S. "will spare no effort to use all its military, intelligence and diplomatic capabilities to bring Americans home safely, wherever they are located."

Obama said terrorists "who seek to harm our citizens will feel the long arm of American justice."

A mysterious U.S. raid last month had tried to rescue Somers but he was not at the site, the Pentagon's spokesman acknowledged Thursday.

Obama cited the captors' video threatening to kill Somers within 72 hours and said "other information also indicated that Luke's life was in imminent danger."

"Based on this assessment, and as soon as there was reliable intelligence and an operational plan, I authorized a rescue attempt yesterday," Obama said in the White House statement.

Secretary of State John Kerry also cited "a compelling indication that Luke's life was in immediate danger" and said "we recommended that the president authorize an attempt to rescue Luke."

Defense Secretary Chuck Hagel said during a news conference in Afghanistan that the rescue operation was "extremely well executed," and was complicated and risky.

Vice President Joe Biden said the U.S. "will be relentless in our efforts to bring to justice" those responsible for a "despicable crime."

Obama said Somers wanted to use his photographic images to convey the lives of Yemenis to outsiders, and had come to the country "in peace and was held against his will and threatened by a despicable terrorist organization. The callous disregard for Luke's life is more proof of the depths of AQAP's depravity, and further reason why the world must never cease in seeking to defeat their evil ideology."