VIRGINIA BEACH, Va. (CNS) — Retired Rear Adm. Jeremiah Denton, who as a young Navy flight captain was captured in 1965 during the Vietnam War and held prisoner for more than seven-and-a-half years, died March 28. He was 89.

He was in a hospice in Virginia Beach and died of heart problems, according to The Washington Post. Details of funeral arrangements were not immediately released.

A Catholic, Denton often talked about how his faith sustained him during his years as a prisoner of war and helped him survive the torture he endured at the hands of his captors.

“Sometimes I wonder how I survived. It was by the grace of God that I am still here,” he told The Tablet, newspaper of the Diocese of Brooklyn, N.Y., in a 1999 interview.

It was his Catholic faith in the end, he said, that provided him the strength to survive his imprisonment, which included four years in solitary confinement.

Born July 15, 1924, in Mobile, Ala., Denton was a graduate of Jesuit-run Spring Hill College in Mobile and the U.S. Naval Academy at Annapolis, Md. He also pursued advanced studies at the National Defense University, the Naval War College and George Washington University.

Over his 34-year Navy career, Denton received numerous military citations, including two Air Medals, two Purple Hearts, the Distinguished Flying Cross and the Combat Action Ribbon. He retired from the Navy in November 1977 with the rank of rear admiral. In 1980, he won election as a U.S. senator from Alabama, serving one term. He was the first Republican since Reconstruction to represent Alabama in the Senate.

His ordeal as a POW began while he was serving as commanding officer of a squadron of fighter planes on the carrier USS Independence in the Gulf of Tonkin. During a bombing mission, his plane was shot down near Hanoi, North Vietnam, July 18, 1965. He parachuted to safety and tried to escape via the Ma River but was quickly outnumbered by North Vietnamese troops and was taken to Hoa Lo Prison, nicknamed the “Hanoi Hilton”‘ by POWs.

U.S. Navy Cmdr. Jeremiah Denton Jr., held for seven years as a prisoner of war during the Vietnam War, is shown in this U.S. Navy photo from the National Archives. (CNS photo/U.S. Navy/National Archives handout via Reuters)

Prisoners there communicated with one another by whistling and scratching on cell walls to learn one another’s names. Denton told The Tablet he was often transferred from one POW camp to another. In one, nicknamed “Alcatraz,” each prisoner was forced to live in a 47-square-inch cell with a bucket for a toilet and only guards for visitors. Some men suffered from malnutrition and many lost so much weight they looked skeletal.

“If it hadn’t been for the rosary, I would have lost my sanity,”‘ Denton said. “It held my mind together.”

The guards continually pressured the POWs to write about the U.S. military and politics, but Denton always refused to comply, giving only his name, rank, serial number and birth date, and he urged the others to do the same.

Once, Denton was put on television. ABC News aired his interview with Japanese reporters. He told them, “Whatever the position of my government is I strongly support it.” But he outsmarted his captors by blinking out in Morse code “t-o-r-t-u-r-e” as he spoke. They never found out he sent the message.

In his book, “When Hell Was In Session,” he described being manacled on his hands and feet and stretched by pulleys until he cried out in agony.

“I offered myself to God with the admission that I could take no more on my own,” Denton wrote. “Tears ran down my face as I repeated my vow to surrender to him.”

To withstand the torture and other mistreatment, Denton fashioned a cross out of bamboo and hid it in the ventilation system of his cell. Then when the North Vietnamese were improving the ventilation, guards found Denton’s cross, tore it up and threw it down an open sewer.

But a work crew, made up of four men and one woman, made a cross out of straw and hid it in Denton’s cell. “They risked infinite torture to replace a cross for an American Catholic,” Denton wrote. “I will never forget that act of courage. How can you be mad at the Vietnamese?”

After his release Feb. 12, 1973, Denton joined his wife and children in Alabama and was promoted to rear admiral.

In an address years ago at a meeting of Legatus International, an organization for Catholic CEOs and managers of large firms, Denton said that when he returned from Vietnam, he saw a nation that had changed, “from being proud to be one nation under God,”‘ to a country of conflict and factionalism — what he called “a fallen democracy.”

“I want to see this blessed nation saved … and preserved,” he said, “for posterity and all mankind, to continue to benefit all of them as it has since her founding.”

Wealth can make people vulnerable to greed, seeking more money for its own sake, he said. “They tend to become inordinately concerned with what they want, stubborn in the extreme about what they want. It’s hard to say, ‘Thy will be done.'”

In 1977, he established the Coalition for Decency, dedicated to family values and good citizenship. He was a consultant to the Rev. Pat Robertson and the Christian Broadcasting Network. Denton lectured on domestic and foreign affairs. In the 1980s, he spoke out in support of U.S.-backed contra rebels, which sought to overthrow Nicaragua’s socialist government.

He was the founder of the National Forum Foundation, a humanitarian outreach to needy countries.

Denton’s first wife, Jane, died in 2007; the couple had been married since 1946. He is survived by his second wife, Mary Belle Bordone; five sons and two daughters from his first marriage; and 14 grandchildren and six great-grandchildren; and a brother, Leo.