While more research is needed before the test is ready for widespread use, experts say it has the potential to reduce fatalities and complications from the 15 million premature births per year worldwide.
The test can also be used to estimate the mother's due date "as reliably as and less expensively than ultrasound," said the report in the journal Science.
The test measures the activity of maternal, placental and foetal genes, assessing levels of cell-free RNA, which are messenger molecules that carry the body's genetic instructions.
"We found that a handful of genes are very highly predictive of which women are at risk for preterm delivery," said co-senior author Mads Melbye, a visiting professor at Stanford University and CEO of the Statens Serum Institut in Copenhagen.
"I've spent a lot of time over the years working to understand preterm delivery. This is the first real, significant scientific progress on this problem in a long time."
Another top researcher was Stephen Quake, professor of bioengineering and of applied physics at Stanford University, who led a team that created a blood test for Down syndrome in 2008 -- now used in more than three million pregnant women per year.
Defined as a baby arriving at least three weeks early, premature birth affects nine percent of US births and is the top cause of death before age five among children worldwide.
Until now, some tests for predicting premature birth were available but they tended to work only in women at high risk, and were accurate only about 20 percent of the time, according to the report.
To develop the test, researchers examined blood samples from 31 Danish women to identify which genes gave reliable signals about gestational age and prematurity risk.
After more research is done and the test eventually comes to market, researchers say it will likely be simple and inexpensive enough to use in poor areas.