Scientists have developed a way to dramatically cut the time needed to diagnose tuberculosis in the developing world.

The treatable disease still causes about one million deaths every year, with diagnosis often taking months to confirm, but a team at the University of St Andrews has developed an analysis that provides result in four hours.

The molecular bacterial load assay (MBLA) investigates patient laboratory samples and can tell health care workers whether tuberculosis is present or not in four hours.

It is also able to count the number of live organisms and show whether the patient is responding to antibiotics.

Professor Stephen Gillespie, leader of the infection group at the university, said: "It can be many months after the patient visits the clinic before the results are available.

"This means that the patient can be on the wrong treatment for a long time with the obvious risks to their health and the very significant risk of their bug developing new resistance.

"MBLA is unique - like a molecular culture method. It means the patient can be seen in the morning and the result be available in the afternoon. If they are failing therapy, this can be identified and managed."

Health professionals from 16 countries and the World Health Organisation visited St Andrews on Wednesday to discuss the system and how to roll it out globally.

Dr Wilber Sabiiti, who has been leading the field evaluation of the test, said: "Given their experience of working with tests which would take weeks or months to get results, this was a game changer.

"Ability to know in real time how the patient is responding to therapy is of paramount importance in the clinical management of tuberculosis disease."