A lung probe that diagnoses bacterial infections could prevent unnecessary use of antibiotics in intensive care units, researchers believe.
The fibre-optic tube can show within 60 seconds whether a patient needs to be treated with the drugs.
It is hoped the Proteus technology could tackle the emergence of bacteria that are resistant to antibiotics.
The project has been developed by scientists at the universities of Edinburgh, Heriot-Watt and Bath.
Proteus has received £2m of funding from the Wellcome Trust.
It will also be boosted by nearly £1m from the CARB-X antibiotic resistance project co-funded by the US government and Wellcome.
Proteus uses chemicals that light up when they attach to specific types of bacterial infection.
This fluorescence is detected using fibre-optic tubes that are small enough to be threaded deep inside patients' lungs.
'Potential side effects'
The research team hope it could "revolutionise the way critically-ill patients and others with long-term lung conditions are assessed and treated".
Doctors currently rely on X-rays and blood tests for diagnosis, but these can be slow and imprecise.
Patients are often treated with antibiotics as a precaution, which exposes them to potential side effects.
Dr Kev Dhaliwal, who is leading the project at the University of Edinburgh, said: "We need to understand disease in patients better so that we can make better decisions at the bedside.
"The Proteus project and clinical partners brings together scientists and clinicians from many disciplines from all corners of the United Kingdom to develop technology that can help us spot disease in real time at the bedside and help us to give the right treatments at the right time.
"The rise of antimicrobial resistance is the biggest challenge in modern medicine and the support from CARB-X will accelerate development of Proteus technology to be ready for clinical use faster and more widely than previously possible."
Tim Jinks, of the Wellcome Trust, said: "Drug-resistant infection is already a huge global health challenge - and it is going to get worse.
"We need global powers to work together on a number of fronts - from the beginning to the end of the drug and diagnostic development pipeline."