Academics at Guy’s and St Thomas’ Foundation Trust devised the test during research funded by Tommy’s, the stillbirth, miscarriage and premature birth charity.

Medical professionals will measure the amount of fetal fibronectin (fFN) which has entered the cervix from the womb during the test. If the swab test finds high levels of the protein, then the patient is more likely to go into premature labour.

Hospitals already look for the presence of fFN to determine whether a woman is likely to have a premature birth. But the new swab test will accurately measure the amount of fFN which has leaked from the patient’s womb, which should help avoid pregnant women being treated unnecessarily.

At the moment only one in 20 of the women who are deemed likely to go into labour early and treated accordingly actually go on to give birth to a premature baby.

Research leader Professor Andrew Shennan said the test was an updated version of current methods and would see fewer women with low-risk pregnancies kept in hospital for observation or given treatment which they do not need.

He said many pregnant women found being moved to other units and treatments “inconvenient and distressing” but the new, more accurate test would give a more reliable diagnosis of a woman’s risk of preterm birth.

The test will use Hologic’s 10Q analyser to precisely measure fFN levels to give an indication of the patient’s risk level within 10 minutes. This is 13 minutes quicker than existing tests, which are not quantitative.