Researchers at the University of Washington have discovered different survival traits in bacteria, depending on where in the lungs they are lodged.
Scientists say this may have helped some bugs evade antibiotic therapy.
One in every 2,500 babies born in the UK has the genetic condition which affects the lungs and digestive system.
The mucus produced leaves people prone to stubborn lung infections, often caused by Pseudomonas aeruginosa bacteria.
Inspecting lung specimens, researchers discovered that separate regions of the same lung had vast arrays of pseudomonas that behaved differently, despite originating from the same strain of bug.
Scientists hypothesise that over time the bacteria become geographically separated (for example by mucus) and then evolve different characteristics to help them survive in these new conditions.
And according to lead researcher, Dr Peter Jorth, some of the bacteria they studied developed “dramatically” different levels of resistance to antibiotics.
Researcher Dr Pradeep Singh added: “This may be part of what makes treatment so difficult. When bacteria sensitive to one kind of stress – for example an antibiotic – are killed, functionally different sibling bacteria are there to take their place.
“This diversity provides insurance for the bacteria in a way because others can take their place if the antibiotics work on them.”
Full story at the BBC website.