Gen. Paul X. Kelley, who was only four months into his tenure as Marine Corps commandant when a suicide bomber drove a truck with thousands of pounds of explosives into the Marine barracks in Beirut in 1983, killing 241 U.S. service members in the single largest loss of U.S. military life since World War II, died Dec. 29 at a retirement community in McLean, Va. He was 91.

The cause was Alzheimer’s disease, said his daughter, Chris Kelley Cimko.

Gen. Kelley served 37 years in the Marine Corps before his retirement in 1987 as commandant, a post that accorded him membership on the Joint Chiefs of Staff. He had been nominated by President Ronald Reagan, whom his daughter described as a friend. She recalled that her father sometimes rode the president’s horse and jokingly described himself as Reagan’s “exercise boy.”

Gen. Kelley had distinguished himself during the Vietnam War, where he received the Silver Star, among other decorations, during two tours of duty. He was a battalion commander in 1965 and 1966, later returning to the war zone in 1970 to lead the last Marine regiment to serve in combat during that conflict.

During the Carter administration, Gen. Kelley led what was then known as the Rapid Deployment Joint Task Force, a team created to heighten U.S. preparedness for crises in the Persian Gulf. Today it is known as the U.S. Central Command, or Centcom, and in recent years has overseen the wars in Afghanistan and Iraq.

But his highest-profile assignment, and the one that led to what he described as “the worst emotional trauma of my life” with the terrorist attack in Beirut in the early morning hours of Oct. 23, 1983, was as Marine Corps commandant.

“I’ve been a Marine for all of my adult life,” Gen. Kelley told reporters the day after the bombing. “And, yesterday, I have to say to you in all sincerity and honesty, was the hardest day of my life.”

He rushed to the scene in Lebanon, where the Marines had been tasked with establishing a stabilizing presence amid a years-long civil war.

“In the aftermath of the bombing,” the New York Times later reported, Gen. Kelley “was the symbol of the Corps. He hastened to the scene, comforted the wounded, mourned the dead, all in the style that has closely identified him with the marine in the trench, an emotional link to the fighting man.”

In one poignant encounter at a U.S. military hospital in what was then West Germany, Gen. Kelley visited Lance Cpl. Jeffrey L. Nashton, who had sustained wounds in the bombing including a fractured skull, collapsed lungs and a broken leg and was temporarily blinded.

“When he heard me say who I was, he grabbed my camouflage coat, went up to the collar and counted the stars” as if to confirm his rank, Gen. Kelley later recounted. “He squeezed my hand,” then wrote on a piece of paper provided by a nurse: “Semper Fi.”

When the wounded Marine returned to the United States, Gen. Kelley presented him with the stars he had worn during their meeting, saying, “They belonged more to him than to me.”

Gen. Kelley endured sometimes withering questions from Capitol Hill lawmakers who suggested that more might have been done to prevent the attack in Beirut. It was noted that two sentries at the Marine headquarters carried unloaded weapons. Loaded or not, Gen. Kelley insisted, “there was no way on God’s earth that those two sentries could have stopped that truck.”

A Pentagon commission tasked with investigating the incident later faulted the operational chain of command, which did not include Gen. Kelley.

Paul Xavier Kelley was born in Boston on Nov. 11, 1928. His mother, who had immigrated to the United States from Ireland, was a librarian. His father, also of Irish heritage, was an Army major who was wounded in World War I and was later recalled to active duty when the United States entered World War II. He died during that conflict of a sudden illness, said Gen. Kelley’s daughter.

P.X. Kelley, as the future general was known, received a bachelor’s degree in economics in 1950 from Villanova University in Pennsylvania, where he studied on an ROTC scholarship, and was then commissioned as a second lieutenant in the Marines. He rose through the ranks to positions including the Marine Corps deputy chief of staff and assistant commandant in 1981 before assuming the commandant’s duties two years later.

His tenure as commandant coincided with the Iran-contra scandal, in which Oliver L. North, a Marine Corps lieutenant colonel and member of the National Security Council staff, was convicted of charges related to his attempted coverup of the illegal sale of weapons to Iran and the diversion of proceeds to rightist Nicaraguan rebels. The Corps also contended with revelations that Clayton J. Lonetree, a Marine sergeant later convicted of espionage, had spied for the Soviet Union while guarding U.S. embassies in Moscow and Vienna.

Besides the Silver Star, Gen. Kelley’s decorations included the Defense Distinguished Service Medal, three awards of the Legion of Merit, two awards of the Bronze Star and the Joint Service Commendation Medal.

After his military retirement, Gen. Kelley served on various corporate boards and devoted himself to honoring fellow veterans during two terms as chairman of the American Battle Monuments Commission. He helped bring to fruition the World War II Memorial, which opened in Washington in 2004, and more recently worked to establish the memorial to President Dwight D. Eisenhower that is scheduled to open in May.

In addition to his daughter, of Burke, Va., survivors include his wife of 68 years, the former Barbara Adams of Washington; a sister; and a granddaughter.