Dr. Julie Segre, left, and Dr. Tara Palmore, right, pose for a portrait at the National Institutes of Health Clinical Center on Monday in Bethesda. (Matt McClain/The Washington Post)

The epidemiologist and the genome researcher had met at a colleague’s send-off, one a doctor chasing down hospital-acquired diseases at the National Institutes of Health’s Clinical Center, the other mapping their genetic codes in a lab across campus.

Two accomplished women in their 40s in male-dominated fields, they clicked instantly. Each with a husband, and five children younger than 12 between them, Tara Palmore and Julie Segre balanced their commitment to science with the demands of raising young families. They would collaborate professionally someday, they decided — when their schedules allowed.

It was just two weeks before the theoretical became frighteningly real and the scientists were thrown into the biggest case of their careers, and they began racing to stop the spread of an outbreak at the hospital that killed seven patients. Four others who were infected died of underlying illnesses.

By the time the last patient died in September 2012, 18 people had been sickened by the Klebsiella pneumoniae bacterium. The “superbug” escaped strict controls at the Clinical Center, one of the country’s premier research hospitals, crawling through isolation units and hiding in already-cleaned ventilators and sink drains.

It was stamped out only after Segre’s team took genetic sequencing to a new level, using the bacterium’s DNA to map its path in the hospital. The unusual collaboration, using gumshoe work and cutting-edge genomics, has brought new attention to hospital infections, which kill about 100,000 patients a year — and the dangers of a growing number of illnesses that antibiotics won’t cure.

“Our patients are so vulnerable,” said Palmore, 42, the hospital’s deputy epidemiologist. The bug attacks only those with weak defenses, and as a hospital of last resort, NIH admits patients with compromised immune systems. “No antibiotic worked.”

The nonprofit Partnership for Public Service called the team — which included Palmore’s boss, the hospital’s deputy director for clinical care, David Henderson, and Evan Snitkin, a post-doctoral fellow on Segre’s staff — a “groundbreaking model for the health-care industry” when it named Segre and Palmore as finalists for this year’s Samuel J. Heyman Service to America Medal in the Science and Environment category.

“The number of people with all kinds of expertise they were able to pull together — it’s laudable,” said Alexander Kallen, a medical epidemiologist at the Centers for Disease Control and Prevention in Atlanta who flew to Maryland to consult on the case. “They took a very aggressive stance to control the outbreak.”

But for months starting in the summer of 2011, there was only a sense of futility and treading water. Sick patients had been isolated and health-care workers were hand-washing like crazy, but the bug kept striking. It left no clear picture: The second patient got sick weeks after the first left the hospital. Standard hospital cultures did not show whether that patient was infected by the first or had an unrelated bug.

Palmore reached back to toxic antibiotics that had been abandoned in the 1960s. The bug quickly outran them.

“Tara, you were pretty much eating, sleeping and living this,” Segre, 47, said, turning to her nodding colleague. They fielded e-mails at 2 a.m. and returned to their computers most nights after putting their kids to bed. Their husbands, a lawyer and a conservation biologist, have equally demanding jobs.

“It was, who’s going to take care of the kids?” Palmore recalled. “Luckily, it worked out because of the grandparents.”

Palmore, petite and poised, grew up in Arlington County and studied medicine at the University of Virginia, where she says infectious disease specialists were role models. Segre grew up in Philadelphia and learned to break codes when she was 8 from her grandfather, a military intelligence analyst for the Allies during World War II. Tall and plainspoken, she credits that skill with helping her earn a doctorate in genetics from the Massachusetts Institute of Technology.

Origins of the illness

Klebsiella arrived with a woman who was admitted to the 243-bed hospital in June 2011 with lung disease. Her chart noted that deadly, drug-resistant bacteria had been detected in her system. She was isolated during her stay and discharged the next month after treatment for lung disease.

But in early August, a man who had been in the hospital for many weeks was stricken and died. And another, and another after that.

Later that month, Snitkin overheard colleagues in the microbiology lab at the National Human Genome Research Institute discuss the outbreak.

He approached his boss, Segre.

“He said, ‘I bet I can figure it out with DNA,’ ” Segre recalled. “No one had sequenced a current health crisis before.” When the first bacterial genome was sequenced more than 10 years ago, it took three years.

She approached Palmore and top hospital officials with their offer: Her team would sequence the DNA of the first patient’s bacteria and compare it with the sequences from other infected patients, allowing them to detect the bug’s footprints.

The first results came back in a month. The bacteria originated in the first patient, with an unusual chain of transmission: That patient infected the third, who infected the second. Many patients, including the first, were carriers but had no symptoms, something the cultures had not detected.

“I was stunned by the specificity of the data,” Palmore recalled. “Here’s the sequencing. It was irrefutable.” It also told her which part of the body or piece of equipment probably spread the bacteria.

The bug was more tenacious than anyone thought, clinging to respirators and other equipment.

Palmore created an entire intensive-care unit for infected patients. NIH brought in machines to fumigate tiny crevices on equipment and in affected rooms with hydrogen peroxide. The hospital changed its method of collecting cultures, shifting from throat and groin samples to a rectal swab since the bacteria lived in the gut.

Hand-washing, the most basic illness-prevention measure in hospitals, was monitored. “It’s not so simple to do something you do 1,000 times a day right every time,” Palmore said.

When a new patient got sick, Segre and Snitkin would sequence the bacteria. That allowed Palmore to catch new cases sooner, narrowing the window when the bug could spread. “It was 100 little things that stopped it,” Segre said.

They breathed easier for months, but the bug returned last summer. A bone marrow transplant patient tested positive and died. DNA sequencing showed that his bacteria were identical to the first patient’s. The hospital staff guessed that a previously infected patient returned to the hospital for a doctor’s visit and infection control was breached. There have been no new cases since then.

Going public

After the last death, Palmore and Segre published a paper in Science Translational Medicine, a scientific journal. It was the first the public heard about the outbreak. Consumer advocates and Montgomery County officials were furious.

It’s routine in such circumstances for the NIH to inform state health officials of outbreaks. But the thinking was, Segre said, that since the crisis was contained and no patients were transferred to Maryland facilities, county officials did not need to be informed. Now, state health officials will alert them.

Today, the hospital screens every patient transferring from another facility for drug-resistant bugs, tests those in the intensive-care unit twice a week and screens everyone else monthly.

The crisis has prompted more openness about hospital infections between doctors and patients, who now receive written material spelling out the risks. Of the remaining Klebsiella carriers, some have naturally cleared the bacteria from their bodies.

Segre and Palmore continue to collaborate, sequencing data from other hospital-acquired bugs. They say neither of them could have solved the Klebsiella puzzle alone.

“We’re both old enough that people trust us, but not so old that they say . . . ‘You can’t try something that’s never been tried,’ ” Segre said.