WASHINGTON — Fifty years ago this summer, the nation was transfixed by a medical drama that is now largely forgotten: the desperate struggle to save the life of Patrick Bouvier Kennedy, the first baby born to a sitting president and first lady since the 19th century.

Five and a half weeks premature, delivered by Caesarean section on Aug. 7, 1963, at Otis Air Force Base on Cape Cod, Patrick weighed a relatively robust 4 pounds 10 1/2 ounces. But he immediately began having trouble breathing, three of his doctors recalled in recent interviews — the first they have given publicly.

His father, President John F. Kennedy, kept asking them, “Will he be retarded?,” one of the doctors said. (His younger sister Rosemary was born mentally retarded.)

With the answer unknowable, a senior physician directed attention to the medical team’s immediate role — saving Patrick’s 1life. It was a battle that would almost certainly have a different outcome today.

Patrick died just 39 hours after his birth, a victim of what was then the most common cause of death among premature infants in the United States, killing an estimated 25,000 babies each year: hyaline membrane disease, now known as respiratory distress syndrome.

His story bears retelling because it highlights the enormous advances in neonatal care over the last half century, and provides a rare glimpse into how a president dealt with a major emotional event.

The term hyaline refers to a glassy membrane that can form in the air sacs of premature infants, impeding their ability to extract oxygen from inhaled air. At the time, medicine had little to offer babies with the disease, other than warm incubators and good nursing care; if a baby made it through on its own for 48 hours, its chances of survival were good. (Newton, Einstein, Picasso and Churchill are cited as examples of preemies who survived.)

Jacqueline Kennedy, had a history of troubled pregnancies; she had already had one miscarriage and had delivered a stillborn daughter, in addition to their children, Caroline, then 5, and John Jr., then 2.

In Patrick’s first hours, his mother’s obstetrician, Dr. John W. Walsh, called Boston Children’s Hospital, a Harvard affiliate. He spoke with the hospital’s chief resident in pediatrics, Dr. James Hughes.

Dr. Hughes, who now lives in Vermont, says he suspected the call was a hoax. But he was able to verify it, and he called an attending pediatrician, Dr. James E. Drorbaugh, who promptly asked his patients to reschedule their appointments, left his office and jumped on a helicopter flight to the Otis hospital.

Dr. Drorbaugh — now in Hawaii — remembers being greeted by the president, who asked him to examine the baby. Finding Patrick in moderate distress, “with a rapid respiratory rate and grunting, with lots of effort going into each breath,” he advised transferring the infant to Boston.

The president asked if the Children’s Hospital facilities could be brought to the Cape, but Dr. Drorbaugh replied that they could not be.

Before leaving Otis, Dr. Drorbaugh said President Kennedy asked him to join him in wheeling the baby into the first lady’s room. She reached into the Isolette and held Patrick’s hand for about 10 minutes — the last time she would see him alive.

The baby was rushed back to Boston. In those days there were no neonatal I.C.U.’s, and ventilators, a standard therapy today, had yet to be used for premature babies. Moreover, it was August, and most of the senior physicians were on vacation, recalled a third doctor, Welton M. Gersony, then training in pediatric cardiology.

“The junior doctors felt overwhelmed and were desperate to get a senior person,” said Dr. Gersony, who later became chief of pediatric cardiology at what is now Morgan Stanley Children’s Hospital.

So the hospital called Dr. Gersony’s mentor, Dr. Alexander S. Nadas, a pioneer in pediatric cardiology, who arrived the next day, Thursday, Aug. 8, from Cape Cod. Patrick’s breathing had become even more labored and Dr. Nadas said, “Welton, we go see the president” — his Hungarian accent turning the w’s into v’s.

Dr. Gersony said President Kennedy appeared “tanned, calm, cool and very polite as Dr. Nadas explained some of the things we would do.” To his insistence on knowing whether the baby would be retarded, Dr. Nadas responded, “Mr. President, we are trying to save the baby’s life.” The president dropped the subject.

Pierre Salinger, the White House press secretary, conveyed a message from Mrs. Kennedy’s sister, Lee Radziwill, who urged the president to send for Dr. Samuel Z. Levine, a prominent Manhattan pediatrician who had cared for her own premature baby. Secret Service agents located him strolling in Central Park and whisked the startled physician to Boston.

Dr. Hughes, the chief resident in pediatrics, recalled that Dr. Levine told the president, “I am very impressed with the efficiency of government” — to which Kennedy, a veteran of political battles with the American Medical Association, replied, “It’s about time you doctors learned that.”

At the time, Boston Children’s Hospital was using a pressurized device called a hyperbaric chamber to increase blood oxygen in so-called blue babies — those with congenital heart defects that deprived them of enough oxygen. The hospital had tried the procedure on preemies two or three times without success, but lacking anything else to offer Patrick, the team thought it was worth the medical equivalent of a Hail Mary pass.

The doctors told the president of the risks, including blindness from excess oxygen; whether he discussed them with his wife, who remained hospitalized on Cape Cod, is unclear.

Through a window in the 31-by-8-foot steel chamber, the president gazed at his son. At first he seemed to improve, but not for long. He died in the early hours of Friday, Aug. 9.

During the ordeal, the president rarely showed emotions to those around him. But after retreating to his private room in the hospital, close aides have written, he wept.

Patrick’s death was eclipsed a few months later by Kennedy’s assassination in Dallas, and it is barely remembered today. But at the time, it sparked interest in research on prematurity.

Over the next decade or so, innovations from physicians, nurses and others led to bold and successful treatments for babies of increasingly lower birth weights. In particular, scientists discovered that hyaline membrane disease resulted from a deficiency of surfactant, a substance that lines the air sacs in the lungs. Surfactant replacement shortened the length of ventilation therapy. This and other advances gave rise to a new specialty, neonatology.

The risks of cognitive impairment are somewhat higher for babies like Patrick than those for a baby born at full term. But even with the advances today, many more severely affected premature babies develop devastating complications that keep them in costly neonatal units for months and affect their neurological and cognitive functions later in life. Ethical debates continue over when and how long neonatal care should be given.

As physicians often do in reviewing their clinical judgment in managing a difficult case, Dr. Drorbaugh said he had often wondered whether “we did the right thing” in putting Patrick in the chamber.

“Before we had any thought of the hyperbaric chamber, we watched these babies struggle and struggle and go downhill, and some of them survived,” he said, “so we can’t arbitrarily say because we thought he was going downhill, he would not have survived.”

But this much is known: If Patrick were being born in August 2013, his odds of surviving would be better than 95 percent.

After the Fact: A Kennedy Baby’s Life and Death