(Alice Li/The Washington Post)

It was just after midnight on March 21, 1980, when a Navy destroyer navigated by Stephen K. Bannon, a junior officer, met with the supercarrier USS Nimitz in the Gulf of Oman. The convoy headed near the Iranian coast, where a secret mission would be launched a month later to rescue 52 U.S. Embassy hostages held in Tehran.

Bannon’s ship, the USS Paul F. Foster, trailed the Nimitz, which carried helicopters that would try to retrieve the hostages. But before the mission launched, Bannon’s ship was ordered to sail to Pearl Harbor, and he learned while at sea that the rescue had failed. A U.S. helicopter crashed into another aircraft in the Iranian desert, killing eight service members and dooming the plan to liberate the hostages.

“I have the perfect word” for how the crew felt upon learning that the mission failed, said Andrew Green, one of Bannon’s shipmates. “Defeated. We felt defeated.”

As Bannon has told it, the failed hostage rescue is one of the defining moments of his life, providing a searing example of failed military and presidential leadership — one that he carries with him as he serves as President Trump’s chief strategist. He has said he wasn’t interested in politics until he concluded that then-President Jimmy Carter had undercut the Navy and blown the rescue mission.

Bannon, a former Goldman Sachs investment banker best known for his time as chairman of the conservative website Breitbart, has become one of the most powerful figures in Washington as chief strategist for Trump. Moreover, in an unusual move for a political operative, Bannon secured a permanent seat on the National Security Council, giving him a voice in critical decisions on defense and foreign policy.

Bannon served seven years in the Navy, with two deployments at sea and then three years as an underling in a Pentagon office dealing with budgets and planning. White House press secretary Sean Spicer cited Bannon’s naval service as justification for giving him a seat on the Security Council, saying during a Jan. 29 appearance on ABC’s “This Week” that such service gave him “a tremendous understanding of the world and the geopolitical landscape that we have now.”

A review by The Washington Post of Bannon’s naval career, based on interviews with more than 25 shipmates and an examination of deck logs stored at the National Archives, found that his service was steady but unremarkable. Bannon’s naval service is the least-known part of his career, and many details have not been previously reported. The records show that his deployments never involved warfare, and the closest he came to conflict may have been his brief experience at the edge of the hostage-rescue fiasco.

This deck log from March 21, 1980, shows that Bannon’s ship, the USS Paul F. Foster, linked up with the USS Nimitz a month before the failed hostage-rescue mission, and “Bannon assumed the deck.”

Still, the experience shaped his thinking. He saw the military buildup under President Ronald Reagan, and the hostage-taking in Tehran continues to inform his view about that region of the world, as well as the role of U.S. military power and its commander in chief.

In recent years, Bannon has spoken in apocalyptic terms about Islam. In 2007, he outlined a movie in which radical Muslims take over the United States and turn it into the “Islamic States of America.” In 2014, he delivered a talk in which he said, “We’re now, I believe, at the beginning stages of a global war against Islamic fascism.”

Bannon declined to be interviewed.

As a White House official, Bannon played a key role in writing the executive order on immigration that targeted seven countries, including Iran. He has urged abandonment of the Obama administration’s nuclear deal with Iran. Bannon’s seat on the Security Council will continue to give him extraordinary power to influence the administration’s policies.

Grueling duty, but no combat

Bannon, who grew up in a Democratic family in Richmond, signed up for the Naval Reserve in 1976, after graduating from Virginia Tech, and then arrived at age 24 at the Navy’s training center in Rhode Island in 1977. The next year, he shipped out on the Foster, on which he would travel mostly in the Pacific and Indian oceans from 1978 to 1980, stopping at ports in countries such as the Philippines and Singapore. It was an anti-submarine destroyer whose mission was to trail aircraft carriers and keep them safe.

He was an ensign and then a lieutenant junior grade, assigned to a windowless, two-bed stateroom with desks and a wardrobe area, a comfortable accommodation compared with the warren of bunks where most sailors slept.

His first job gave him responsibility for engineering, including air conditioning, hydraulics and electronics. It was “all the inelegant work of the ship,” said Edward “Sonny” Masso, a retired rear admiral who served with Bannon. “Not just anybody succeeds in that job.”

Bannon later became a navigator, guiding the ship — at times with a sextant when the electronic system lost contact with satellites — and writing reports.

Not once during Bannon’s deployments at sea was the ship involved in combat, but it was grueling duty, full of tedium and drills, according to shipmates and logs. At times, the Foster would play cat-and-mouse games with Soviet vessels, trailing and testing each other, shipmates said.

Scott Brubaker, an enlisted sailor who served with Bannon, said that experience “will change you forever. . . . You pull into Hong Kong and go to Victoria Peak. You go to Singapore. There are the smells, sometimes the stench, sometimes the abject poverty. . . . We learned we had a very big world, and one that certainly had its inherent risks.”

Stephen Bannon served on two deployments between 1978 and 1980. (Courtesy of the Bannon family)

Bannon is remembered by many of his shipmates as a quiet, proficient and studious officer.

William Keating, who was Bannon’s roommate for two years, called him “a good guy who did his job,” and he had no recollection of political discussion. The portrayal of Bannon today as a far-right nationalist “is not the individual that I knew,” Keating said.

On one occasion, Keating recalled, Bannon proudly brought his father aboard and gave up his bed so his father could sleep in the stateroom. “I remember the two of them together,” Keating said. “They had a really good father-son relationship.”

Some shipmates had more critical recollections of Bannon.

“He wasn’t the best engineer we had, but he wasn’t bad. He was basically an above-average officer,” said Robin Mickle, a retired Navy captain.

Mickle said he did not get along personally with Bannon and found him “obnoxious” at times.

“His only problem was that he wasn’t in it for the long run. He never really wanted to stay. He told us it would look good on his résumé if he went into politics. The politics part didn’t impress any of us.”

Bannon told Bloomberg Business Week in 2015 that “I wasn’t political until I got into the service and saw how badly Jimmy Carter f---ed things up. I became a Reagan admirer.”

Greg Garrison, who served as an engineer on the Foster, said: “What I remember was he was kind of uppity; he didn’t get along with enlisted men. He just kind of stuck his nose up at us.”

Bannon is remembered as much for his skill at sports as for his work on the ship’s deck. When the Foster docked at ports around the world, the ship’s basketball team often lined up games against local competition. Bannon’s nickname was “Coast,” short for coast-to-coast, because on the basketball court he’d never pass the ball, Mickle said. Bannon also excelled at baseball, although shipmates ribbed him for being called out three times in one inning, recalled David Ziemba, who spoke warmly about his former roommate.

Bannon, meanwhile, scoured newspapers such as the Wall Street Journal for what turned out to be a lucrative sideline. He put money into commodities such as gold and silver, advising shipmates, Masso said, and presaging his career as an investment banker.

“He was like our investment sensei,” Masso said, referring to a teaching role.

‘A little bit of a hell-raiser’

Bannon’s patrols became more tense after Iranians in 1979 took control of the U.S. Embassy in Tehran and seized hostages, and the streets filled with protesters chanting slogans such as “Death to America.” The Cold War still dominated military thinking, but military planners also put more emphasis on anti-terrorism measures.

The presidential campaign in the United States focused much attention on Iran’s seizure of U.S. Embassy officials. Carter, a Democrat, was blasted by Republicans for allowing the hostage saga to have taken place. A nightly news program was called “America Held Hostage,” and Reagan, a Republican, vowed to strengthen the country’s military.

Back on the Foster, crew members said they were aware of the growing tensions, and they were eager to be part of whatever action might come.

In late November 1979, however, the Foster’s sonar dome — a crucial piece of equipment used for navigation and detection — was damaged. Bannon, in his role as navigator, wrote in the deck log: “Slow to 5 Kts to reduce damage to Sonar Dome.” The logs do not indicate what caused the damage, and no blame was assessed.

Traveling at about one-third of its normal speed in stormy seas — during which the Foster was hit with 20-foot-high waves — the vessel detoured to Guam for repairs.

Then, after nearly two months at Guam and weeks more of travel, Bannon’s ship linked up on March 21, 1980, with the USS Nimitz. Three hours after the rendezvous, “Bannon assumed the deck” to help navigate, according to the logs of his ship.

The Nimitz, one of the world’s largest supercarriers, already was involved in preparation for the hostage rescue mission. Ziemba, the Bannon roommate, noticed helicopters stored on the Nimitz that he later realized were to be used in the rescue mission.

Bannon’s ship operated from an area called Gonzo station, according to deck logs that use the Navy shorthand for Gulf of Oman Naval Zone of Operations. Bannon’s ship trailed the Nimitz around the gulf, part of which borders southern Iran. Then the Foster was ordered to sail to Pearl Harbor.

What happened next is unclear because all of the deck logs for April 1980 are missing from the National Archives. (Officials said that records for that month were not among the documents it originally received.) It was on April 24 that the rescue mission was launched and resulted in the eight deaths in the desert.

Larry Benson, an enlisted sailor who remembered Bannon as “a little bit of a hell-raiser,” said he was told later that the Foster would have played a further role in the rescue if the mission had been completed. “This was classified. A lot of people didn’t know we were part of the process,” Benson said. But other sailors said they had no knowledge about that.

The deck logs resume on May 1, and they show that Bannon navigated as the Foster sailed from Pearl Harbor to San Diego.

Some of Bannon’s shipmates recalled that the crew was given a ribbon for its modest role. But Bannon and many other crew members were livid at Carter for the botched rescue.

“It shattered his confidence in President Carter,” Masso said. “It made him all the more in the tank for Reagan.”

In October 1980, with the Foster in port at Long Beach, Bannon went to Masso’s home to watch a Carter-Reagan debate. “He watched that debate like a prizefight,” Masso said.

Three months later, after Reagan won the election, Bannon was working for the new president, serving as an assistant in the office of the chief of naval operations at the Pentagon. He watched with satisfaction as Reagan increased the military budget and strengthened the Navy, with most of the focus on combating the Soviet Union. He served for three years and simultaneously studied national security and earned a master’s degree at Georgetown University.

Stephen K. Bannon listens during a meeting with House and Senate lawmakers at the White House on Feb. 2. (Jabin Botsford/The Washington Post)

Peter Harris, who served with Bannon at the Pentagon and also was in the Georgetown program, recalled that Bannon persuaded him to join the Toastmasters program, which teaches public speaking. “We did a lot of briefings, and we wanted to polish our public speaking skills,” Harris said.

Harris said Bannon was “an excellent officer” and described their Pentagon duties as “being down the food chain quite a bit . . . but [we] were exposed to a lot. We were all very involved in the Navy budget, working with the senior admirals. It was a good time to understand how the Navy formulates its policies and looks at the force structure 20 years out.”

Patrick McKim, who also served with Bannon at the Pentagon and has remained a close friend and sometimes writes for Breitbart, said that the period is crucial to understanding Bannon’s development. When Bannon arrived at the dawn of the Reagan era, McKim said, the military was still trying to emerge from the post-Vietnam era and the failed hostage rescue.

“People made you ashamed to be an officer,” McKim said in an interview arranged by a Bannon associate. Reagan’s arrival and the military buildup changed that view, and Bannon idolized the new president. Two years before Bannon left the military in 1983 and headed to Harvard Business School, he told McKim that he had a vision of his future.

“He mentioned that he’d go to Harvard and come back and be secretary of defense,” McKim recalled.

Bannon did not get the top job at the Pentagon. But 34 years after revealing that ambition, Bannon’s Navy career can be seen in a different light: It launched him on a path to Trump’s side, which may prove to be an even more powerful position.

Alice Crites contributed to this report.