Thomas E. Schaefer, second from left, in 1980 with other U.S. hostages in Iran. From left, William Belk, Donald Hohman and John Craves. (AP/AP)

Thomas E. Schaefer, a retired Air Force colonel who was the ranking military officer among the 52 Americans held hostage in Iran for 444 days before being released in 1981, died May 31 at a hospice in Scottsdale, Ariz. He was 85.

The cause was congestive heart failure, said his son David Schaefer.

Col. Schaefer was a military attache at the U.S. Embassy in Tehran when militants seized the compound on Nov. 4, 1979, and 66 people were taken hostage.

From the first day of the takeover, Col. Schaefer was singled out for special attention. As the ranking U.S. military officer in the embassy, he was accused of running a “nest of spies.”

His captors paraded him blindfolded in front of television cameras and repeatedly threatened to put him on trial and execute him.

Thomas E. Schaefer, who was a hostage in Iran for 444 days from 1979 to 1981, in 2013. (Brian Skoloff/AP)

He spent 150 days in solitary confinement and began his captivity by enduring 14 days of relentless interrogation in a cold prison cell with damp floors and only a thin blanket for warmth.

“I could see my breath the entire time,” Col. Schaefer said in a 2004 interview. “They were breaking me down both physically and mentally. I could feel myself losing it.”

He said he used a pin each day to punch a code into his Bible to get through the hostage ordeal.

Col. Schaefer was among the last hostages released on Jan. 20, 1981. Just before the aircraft bringing the hostages home entered U.S. airspace, the co-pilot invited Col. Schaefer to take his seat in the cockpit.

Col. Schaefer retired from the Air Force less than two years later and was a professional speaker for decades. His family said he spoke to more than 250,000 students and adults about facing adversity.

“Really, he was a positive guy,” David Schaefer said Friday. “He tried to educate and help people deal with really bad situations in their lives.”

In 1998, Col. Schaefer said the United States should reestablish relations with Iran for strategic reasons. But in 2013 he denounced as “foolishness” the Iran nuclear deal, then under discussion, saying he didn’t know of any Iranian leaders who could be trusted.

Born in Rochester, N.Y., Col. Schaefer was a bomber pilot for the Air Force — first flying B-47s and then B-52s before he switched to administrative positions.

In retirement, he and his wife lived in Arizona for the past 30 years, first in the Phoenix suburb of Peoria and then in Scottsdale since 2013.

Survivors include his wife of 63 years, Anita; two sons; six grandchildren; and three great-grandchildren.