An American journalist kidnapped and held hostage for nearly two years by an al-Qaida-linked group in Syria was released Sunday, less than a week after the horrific execution of American journalist James Foley by Islamic militants.

White House national security adviser Susan Rice said Peter Theo Curtis, 45, of Massachusetts is now safe outside of Syria. Secretary of State John Kerry said Curtis was held by Jabhat al-Nusra, also known as the Nusra Front, an al-Qaida-linked militant group fighting the government of Syrian President Bashar Assad.

Curtis was not believed to be among the hostages held by the Islamic State group that executed Foley. Islamic State was formally disavowed by al-Qaida earlier this year after being deemed too brutal.

President Barack Obama, who was wrapping up a vacation in Massachusetts, was briefed Sunday morning on Curtis’ release.

“The president shares in the joy and relief that we all feel now that Theo is out of Syria and safe,” said White House spokesman Eric Schultz. “But we continue to hold in our thoughts and prayers the Americans who remain in captivity in Syria, and we will continue to use all of the tools at our disposal to see that the remaining American hostages are freed.”

A senior administration official said Curtis was released in the Golan Heights, where he was met by U.S. government personnel who were transporting him to Tel Aviv.

Qatar’s Foreign Ministry confirmed late Sunday that the Gulf emirate succeeded in gaining Curtis’ release. A government statement released by the official Qatar News Agency said he was kidnapped in Syria in 2012 and said Qatar “exerted relentless efforts to release the American journalist out of Qatar’s belief in the principles of humanity and out of concern for the lives of individuals and their right to freedom and dignity.” The agency said Curtis was handed over to United Nations representatives.

In a video dated July 18, 2014, Curtis sits cross-legged on a floor with his hands bound, and appears to read from a sheet placed in front of him on the floor. Addressing the U.S. and European governments, he pleads for them to contact a named intermediary before it is too late.

“They have given me three days to live,” he says as a man holding an assault rifle and dressed in camouflage stands next to him. “If you don’t do anything, I’m finished. I’m dead. They will kill me. Three days. You have had 20 days, and you’ve done nothing. “

He does not specify any demands, only urges Western governments to make contact with the intermediary.

It was not known which, if any, of the captors’ demands were met.

The energy-rich Gulf nation of Qatar, which is a leading supporter of the Syrian rebels fighting to oust President Bashar Assad, has been involved in mediating hostage releases in Syria over the past year.

His family said they believe Curtis was captured in October 2012, shortly after crossing into Syria.

“My heart is full at the extraordinary, dedicated, incredible people, too many to name individually, who have become my friends and have tirelessly helped us over these many months,” Curtis’ mother, Nancy Curtis, said in a statement from the family. “Please know that we will be eternally grateful.”

Curtis, under the byline Theo Padnos, has written for the New Republic and in 2011 wrote a book called “Undercover Muslim: A Journey Into Yemen,” which studied the radicalization of disaffected youths.

Before leaving for Yemen in 2005 to study Islam, he worked in the Vermont prison system teaching teenage inmates. That experience resulted in the book “My Life Had Stood a Loaded Gun.”

“He seems to be in good health,” Curtis’ cousin Viva Hardigg said in an interview. “We are deeply relieved and grateful for his return and the many people who have helped us secure his freedom. At the same time, we are thinking constantly of the other hostages who are still held and those working to help them be freed. We want to do everything we can to support their efforts.”

Kerry, a former senator from Massachusetts, voiced relief and gratitude for Curtis’ release, “particularly after a week marked by unspeakable tragedy.”

“Theo’s mother, whom we’ve known from Massachusetts and with whom we’ve worked during this horrific period, simply refused to give up and has worked indefatigably to keep hope alive that this day could be a reality,” Kerry said.

He added that over the past two years, Washington had “reached out to more than two dozen countries asking for urgent help from anyone who might have tools, influence or leverage to help secure Theo’s release and the release of any Americans held hostage in Syria.”