The common gram-negative bacterium Pseudomonas aeruginosa is a true comic book villain among microbes.

Capable of slipping through our defenses to infiltrate our most sterile spaces, this devious killer deserves its ranking among the World Health Organization's list of priority 1 pathogens.

Most of us encounter the microbe in our everyday environments and come away completely unscathed. Under the right circumstances, however, it readily takes advantage of the smallest of gaps in our defenses, exploding into a runaway infection.

Just how such a ubiquitous microorganism came to be an opportunistic threat has been something of a mystery, prompting an international team of researchers to investigate the species' evolutionary history a little more closely.

Led by scientists from the University of Cambridge, the group developed a genetic family tree of 596 closely related strains based on 9,829 bacterial samples taken from a variety of human, animal, and environmental sources around the globe, some dating back as far as the year 1900.

Among these, they found a mere 21 of the strains were responsible for the vast majority of infections. It's been the rapid evolution of these bad eggs over the past two centuries that has given us such a dangerous infectious agent.

More than half a million people die each year as a direct result of a P. aeruginosa infection, which is particularly challenging to treat thanks to the bacterium's well-stocked antibiotic resistance toolkit.

Capable of surviving as easily in jet fuel as it can in virtually pure water, P. aeruginosa's adaptability seems to know no bounds. This uncanny skill set makes it a particular problem in healthcare settings, where even the most hygienic practices aren't enough to keep infections at bay.

Hospital patients with chronic lung conditions such as cystic fibrosis (CF) and bronchiectasis are especially susceptible.

In fact, the researchers discovered several of the infectious strains of the bacterium have even evolved a strong affinity for people with CF. A closer look found these strains had developed targeted methods of exploiting the compromised health of CF patients, helping the microbes avoid destruction at the hands of their host's immune systems.

Having found a safe new space to survive within the very immune cells tasked with their removal, the CF-specific P. aeruginosa strains continued to evolve by swapping resistance factors with one another like recipes at a family lunch.

The discovery exemplifies the pathogen's ability to use its survivability to carve out new niches in extreme environments, giving it space to quietly gather the tools it requires for another evolutionary leap.

"From a clinical perspective, this study has revealed important information about Pseudomonas," says senior author Andres Floto, a respiratory biologist and director of the UK Cystic Fibrosis Innovation Hub at the University of Cambridge.

"The focus has always been on how easily this infection can spread between CF patients, but we've shown that it can spread with worrying ease between other patients, too."

Knowing how easily highly resistant forms of the pathogen can spread puts greater pressure on developing ultra-efficient screening and isolation measures.

P. aeruginosa is unlikely to ever become an easily defeated foe. But knowing the microbe's strengths is vital if we're to keep it from evolving into an ever more dangerous threat.

"Our research on Pseudomonas has taught us new things about the biology of cystic fibrosis and revealed important ways we might be able to improve immunity against invading bacteria in this and potentially other conditions," says Floto.

This research was published in Science.