The test picks up babies with retinoblastoma and is likely to identify around 50 cases each year in England.
Retinoblastoma is a rare type of eye cancer that can affect young children, usually under the age of five.
If it is picked up early, the condition can often be successfully treated and more than nine out of 10 children with it are cured.
However, if the cancer goes undetected, this can lead to the loss of one or both eyes, and even death.
One of the signs of retinoblastoma is an unusual, white reflection in the pupil of the eye – this can look like a cat’s eye that is reflecting light and may be visible in photographs.
The new non-invasive NHS test, developed at Birmingham Women’s and Children’s NHS Foundation Trust, can detect genetic changes that cause retinoblastoma.
It will be offered to pregnant women with a known family history of the disease, which is often discussed during pregnancy appointments,
For the test, a blood sample is taken from the mother before birth and tested and analysed for mutations, which can determine with almost 100% accuracy if the baby will develop retinoblastoma.
The test looks for a mutation in the RB1 gene. About nine in 10 children who are born with an RB1 mutation develop retinoblastoma.
Picking up the cancer this early means treatment can start on the affected eye as soon as the baby is born, with doctors closely monitoring the other eye for any signs.
The test can also predict if the disease might develop in siblings.
NHS chief executive Amanda Pritchard said: “The introduction of this pioneering new test is fantastic news for babies and their parents, and has the potential to save hundreds of lives over the coming years.
“Cancer is such a terrible illness and a baby being born with it can have a huge impact on parents and families during what should be an incredibly happy time.
“But, backed by world-class innovation and services like the NHS Genomic Medicine Service, through the Long Term Plan, the NHS is developing and delivering more cutting edge treatments like this one to help save lives and keep families together.”
Given that the tumours were quite severe when he was born, the fact he could be treated straight away definitely affected his outcome
Siani Bainbridge, mother of newborn retinoblastoma patient
Siani Bainbridge, 22, from County Durham, had retinoblastoma as a child and feared her infant son Oscar might also carry the faulty gene.
She took part in the trial of the test and discovered Oscar had retinoblastoma.
She said: “Given that the tumours were quite severe when he was born, the fact he could be treated straight away definitely affected his outcome. It was nice to know the day he was diagnosed, it was ready, set go.”
Just a week after his birth, Oscar started cancer treatment, which involved chemotherapy and then laser therapy.
While doctors could not save the sight in one eye, he did not have his eyeball removed, and kept his sight in the other eye.
The test is one of more than 15 new tests and amendments being added to the National Genomic Test Directory, which sets out the genomic tests for disease available through the NHS Genomic Medicine Service.
The directory covers more than 3,000 rare diseases and over 200 types of cancer.