D.P. McAuliffe, a retired Army lieutenant general who was one of the first U.S. soldiers to liberate a Nazi concentration camp during World War II and who, after his his military career, was the administrator of the Panama Canal, died July 31 at The Fairfax retirement facility in Fort Belvoir, Va. He was 90.

He had pneumonia, his son, Denny McAuliffe, said.

Less than six months after graduating from the U.S. Military Academy in 1944, Gen. McAuliffe was serving with the 89th Infantry Division in Europe as a field artillery officer. In a brief account of his career written by his family, he noted that he “walked across all of Germany” in the final months of World War II.

In April 1945, he was a young lieutenant in a unit that entered the Ohrdruf concentration camp, part of the larger German concentration camp of Buchenwald. Ohrdruf was the first Nazi concentration to fall into Allied hands, and, as Gen. McAuliffe wrote, “I was among the first Americans to see it.”

He recalled a scene that was beyond horrific. Among other things, he saw the corpses of three U.S. airmen who had been shot in the head.

“Inside the camp,” he wrote, “were thousands of bodies, of mostly Jewish men, stacked three to twelve feet high, unclothed, awaiting burning.”

In archival films of the liberation, Gen. McAuliffe can be seen ordering Nazi officials and local townspeople to enter a death chamber and view victims of the Holocaust. When three top Army generals — Dwight D. Eisenhower, Omar N. Bradley and George S. Patton — visited the camp, Gen. McAuliffe was close enough to see the expressions on their faces.

“General Patton became ill,” he wrote, “excused himself, and threw up.”

Days later, Eisenhower described the scene in a letter to Gen. George C. Marshall.

“The visual evidence and the verbal testimony of starvation, cruelty and bestiality were . . . overpowering,” he wrote. “I made the visit deliberately in order to be in a position to give first-hand evidence of these things if ever, in the future, there develops a tendency to charge these allegations merely to ‘propaganda.’ ”

Gen. McAuliffe participated in another grisly military operation later in his career. As commander-in-chief of the Army’s Southern Command in Panama in 1978, he helped organize the recovery and transportation of bodies from Jonestown, the settlement in Guyana where about 900 followers of cult leader Jim Jones committed suicide.

After retiring from the Army as a three-star general in 1979, Gen. McAuliffe was named by President Jimmy Carter to be the administrator of the Panama Canal Commission. His job was to manage the difficult transition of the canal to Panamanian control, as mandated by a treaty.

During the 10 years he held the post, Gen. McAuliffe tried to fend off interference from the Panamanian military and government, as well as demands from Congress. He supervised a workforce of 8,000 that included almost 2,000 Americans, many of whom felt isolated and scorned in an increasingly hostile place.

Less than two weeks before Gen. McAuliffe retired in 1989, U.S. forces invaded Panama in an attempt to force strongman Manuel Noriega from power. The 50-mile canal was temporarily closed to traffic for the first time since it opened in 1914.

In testimony before Congress in 1991, Gen. McAuliffe said he had only 45 minutes’ warning before the invasion began.

“Had it been hit by artillery or mortar fire, it might well have caused a lengthy shutdown of the canal,” he said. “Pure luck, and nothing else, prevented a potential disaster.”

Dennis Philip McAuliffe — known casually as Phil — was born April 8, 1922, in New York City. His mother and father were Irish immigrants who worked as a maid and chauffeur, respectively.

He graduated from the U.S. Military Academy at West Point, N.Y., on June 6, 1944 — D-Day. He received a master’s degree in electrical engineering from the University of Pennsylvania in 1950.

From 1967 to 1969, he was executive officer to Gen. Earle Wheeler, chairman of the Joint Chiefs of Staff. In Vietnam in 1969 and 1970, Gen. McAuliffe was the senior adviser to Lt. Gen. Do Cao Tri, once described by Time magazine as the “best fighting general” in the South Vietnamese army. Tri was later killed in a crash of Gen. McAuliffe’s old helicopter.

In the 1970s, while based in Panama, Gen. McAuliffe tried unsuccessfully to encourage Nicaraguan President Anastasio Somoza — a fellow West Point graduate — to relax his grip on power in the face of oppostion. Somoza refused, but soon had to flee his country and ultimately was assassinated.

Gen. McAuliffe lived for many years near Alexandria, Va., in Fairfax County and was a member of Alexandria’s Good Shepherd Catholic Church. His military decorations included the Defense Distinguished Service Medal, the Distinguished Service Medal, three awards of the Legion of Merit, the Distinguished Flying Cross and two Bronze Star Medals.

His wife of 64 years, Kathleen Bolton McAuliffe, died in 2011. Survivors include three children, Dennis P. “Denny” McAuliffe Jr., an editor at The Washington Post, of Clifton, Va., Kathie McAuliffe of Chantilly, Va., and Carolyn Shoemaker of Martinez, Ga.; three brothers; five grandchildren; and five great-grandchildren.

Gen. McAuliffe organized reunions of the West Point Class of 1944 and of his World War II infantry division that had marched into Ohrdruf as some of the first witnesses of one of history’s most unspeakable atrocities.

His family knew nothing of his role in liberating the concentration camp until 1993, when he and other veterans took part in the dedication ceremony of the U.S. Holocaust Memorial Museum.