Pioneering scientists at the University of Leicester today unveiled a new weapon in the fight against a killer superbug.
The research team say the breakthrough in the battle against C-diff should have a big impact on preventing infections in the future.
The technique means the bacterium – Clostridium difficile – can be sniffed out with an "electronic nose", using techniques developed in the university's chemistry department.
C-diff can lead to serious infections, causing stomach cramps, temperatures and diarrhoea.
It is resistant to many ordinary antibiotics and can lead to death.
In 2012, there were 1,646 deaths in the UK involving C-diff and, while the number of cases has fallen rapidly, a new strain of bacteria has emerged in recent years that tends to cause more severe infections.
Professor Paul Monks, a member of the research team, said the discovery should have a big impact on preventing infections.
The scientists can analyse patients' faeces to search for the bug and discover whether the patient has C-diff – and, if so, which variety they have.
He said: "Essentially, the different strains smell different and the ones that cause infections smell different to the ones that don't. What's really cool about it is that learning the different ways infections come about can help us find ways to prevent C-diff causing infections in the future."
The breakthrough should also lead to better ways to prevent the bug by understanding how it works.
Current tests just examine the symptoms and search the faeces for toxins suggesting C-diff is present, rather than sniffing out the bug itself.
As well as saving people's lives, better ways of treating C-diff should save the NHS money if patients are not hospitalised for so long with it.
A spokesman for Leicester's hospitals welcomed the discovery.
The hospitals trust now sees about 60 cases a year of the superbug, compared to more than 1,900 at its peak in 2007.
The spokesman said: "Battling hospital infections such as C-diff is an ongoing challenge for all hospitals.
"We have worked especially hard to reduce infection rates and were really pleased to achieve our all-time lowest C-diff figures earlier this year.
"However, combating hospital infection is not easy and a tool like this would be a fantastic asset in helping us keep rates to a minimum."
The critical discovery by the university team was working out the chemical fingerprints of various organic compounds that are associated with different strains of the bug.
Professor Monks and his colleague, Professor Andy Ellis, from the Department of Chemistry, were helped by Dr Martha Clokie, from the university's Department of Microbiology and Immunology.
She said: "Current tests for C-diff don't generally give strain information – this test could allow doctors to see what strain was causing the illness and allow doctors to tailor their treatment."
Professor Ellis said: "This work shows great promise.
"The different strains of C-diff have significantly different chemical fingerprints and, with further research, we would hope to be able to develop a reliable and almost instantaneous tool for detecting a specific strain, even if present in very small quantities."