RIP Prisoner of war Jeremiah Denton declared his loyalty to the U.S. government during a 1966 interview for what was supposed to be a propaganda film. But his enraged captors missed his more covert message: "T-O-R-T-U-R-E," blinked into the camera in Morse code, a dispatch that would alert the U.S. military to the conditions he endured. Denton, who would survive 7Â½ years confined in a tiny, stinking, windowless cell at the infamous "Hanoi Hilton" and other camps before his release in 1973, died of heart problems Friday in Virginia Beach, Va., at age 89, his grandson Edward Denton said. The elder Denton later became the first Republican from Alabama elected to the U.S. Senate since Reconstruction, though the iron will that allowed him to persevere in captivity gave rise to criticism he was too rigid a politician. In July 1965, a month after he began flying combat missions for the U.S. Navy in Vietnam, the Mobile native was shot down near Thanh Hoa. He was captured and recalled his captivity in a book titled "When Hell Was in Session." "They beat you with fists and fan belts," he told the Los Angeles Times in 1979. "They warmed you up and threatened you with death. Then they really got serious and gave you something called the rope trick." The use of ropes â€” to cut off circulation in his limbs â€” left him with no feeling in his fingertips and intense muscle spasms, he said. Some of the most severe torture came after the 1966 interview, in which he confounded his captors by saying that he continued to fully support the U.S. government, "and I will support it as long as I live." "In the early morning hours, I prayed that I could keep my sanity until they released me. I couldn't even give in to their demands, because there were none. It was pure revenge," Denton wrote. The tape was widely seen, and U.S. intelligence experts had picked up the Morse Code message. But Denton theorized later that his captors likely figured it out only after he was awarded the Navy Cross â€” the second-highest decoration for valor â€” for the blinks in 1974. He said his captors never brought him out for another interview. But with the war's end drawing closer, he was released in February 1973. Denton was the senior officer among former POWs who stepped off a plane into freedom at Clark Air Base in the Philippines. Denton epitomized the military spirit as he spoke for the returning soldiers: "We are honored to have had the opportunity to serve our country under difficult circumstances. We are profoundly grateful to our commander-in-chief and to our nation for this day. God bless America." His words and bearing, beamed back to his country by television, gave heart to the military at a time of increasing uncertainty and bitter division over the course of the war. He was promoted to rear admiral and retired from the Navy in November 1977. Denton then turned to politics, despite having no experience running for a statewide political office. With Ronald Reagan atop the GOP ticket, Denton became the first Republican elected to the Senate from Alabama since the Reconstruction era following the Civil War. "The valor that he and his fellow POWs displayed was deeply inspiring to our nation at the time, and it continues to inspire our brave men and women who serve today," President Barack Obama said in a statement. "As Senator, he served as a strong advocate for our national security. He leaves behind a legacy of heroic service to his country, and Michelle and I send our condolences to the Denton family." In Washington, he was a Reagan loyalist, a defender of military might and an advocate for a return to traditional family values and conservative stands on moral issues. But critics said his rigid stands left him no room for political compromise and lessened his influence, limiting his ability to help Alabama. Denton lost his re-election bid in 1986 by only a fraction of a percentage point. After his defeat, Denton founded the Coalition for Decency and lectured about family causes. Denton also launched a humanitarian outreach to needy countries through his National Forum Foundation, which arranged shipments of donated goods. "He was a war hero, an honorable senator, and a family man who cared deeply about his country," said a statement from U.S. Sen. Richard Shelby, who as a Democrat defeated Denton in 1986. Shelby switched to the GOP in 1994 and was elected to a fifth term in 2010. Arizona Sen. John McCain, who also was held captive as a POW in Vietnam, described Denton as his mentor. "As a senior ranking officer in prison, Admiral Denton's leadership inspired us to persevere, and to resist our captors, in ways we never would have on our own," McCain said. In later years, Denton lived in Williamsburg, Va., but he still appeared at patriotic gatherings. In November 2008, an emotional Denton watched at Battleship Memorial Park in Mobile, Ala., as a newly restored A-6 Intruder fighter/bomber â€” like the one he flew over North Vietnam â€” was rolled out in his honor. Denton's grandson, Edward, said that on one hand, Denton was a normal grandfather who enjoyed taking his grandchildren fishing aboard his boat in Mobile. "On the other hand," he said, "he was a war hero and someone who set an example for being what being a good, patriotic American is all about."