FILE - This combination of two photos taken from video released on June 21, 2017, by the Taliban spokesman Zabihullah Mujahid, shows kidnapped teachers Australian Timothy Weeks, top, and American Kevin King, who were abducted in Afghanistan in August 2016. King and Weeks were released Tuesday, Nov. 19, 2019, hours after the Afghan government freed three Taliban prisoners and sent them to Qatar. (AL-EMARA Taliban via AP, File)

BERLIN (AP) — An American and an Australian who were freed by the Taliban this week after three years in captivity are now in Germany receiving treatment at a U.S. military hospital, officials said Thursday.

American Kevin King and Australian Timothy Weeks were met at the U.S. Air Force’s Ramstein base in southern Germany by U.S. Ambassador Richard Grenell and Australian Ambassador Lynette Wood after they arrived late Wednesday, a U.S. official said.

Both men were then taken to the nearby Landstuhl Regional Medical Center where they will stay for some time for medical evaluations and a reintegration process, the official told The Associated Press, speaking on condition of anonymity to discuss the case.

The two former American University in Kabul professors were freed Tuesday in Afghanistan in exchange for three top Taliban figures.

A Taliban statement that followed the swap, which freed the younger brother of Sirajuddin Haqqani, the head of the fearsome Haqqani network, called the exchange a “confidence-building measure” that could help bring an end to Afghanistan’s endless war.

The U.S. State Department said after their release that they would both soon be reunited with their loved ones.

Australian Prime Minister Scott Morrison expressed gratitude for the hostages’ release, saying on Twitter that Weeks’ family had “asked the Australian government to convey their relief that their long ordeal is over, and their gratitude to all those who have contributed to Tim’s safe return.”

Grenell told Fox News that he had presented King with an American flag when he met him at Ramstein and told him that “we never forgot about you.”

Grenell said King then told him: “I know that, and that is what sustained me all these years.”

The Australian embassy had no comment.

FILE - In this May 26, 2005 file photo a soldier stands in front of the Landstuhl Regional Medical Center in Landstuhl, Germany. An American and an Australian who were freed by the Taliban earlier this week after three years in captivity are now in Germany receiving treatment at a U.S. military hospital.American Kevin King and Australian Timothy Weeks were met at the U.S. Air Force’s Ramstein base in southern Germany by U.S. Ambassador Richard Grenell and Australian Ambassador Lynette Wood when they arrived late Wednesday night, an American official said. (AP Photos/Michael Probst,file)
FILE - In this Aug 29, 2011 file photo a bus stands at the entrance of Landstuhl Regional Medical Center in Landstuhl, Germany. An American and an Australian who were freed by the Taliban earlier this week after three years in captivity are now in Germany receiving treatment at a U.S. military hospital.American Kevin King and Australian Timothy Weeks were met at the U.S. Air Force’s Ramstein base in southern Germany by U.S. Ambassador Richard Grenell and Australian Ambassador Lynette Wood when they arrived late Wednesday night, an American official said. (AP Photo/Michael Probst, file)