A simple blood test to identify the sex of foetuses at just seven weeks could cut the need for further risky tests during pregnancy, say scientists.
Test looks for pieces of foetal DNA
Many genetic disorders affect only boys or girls - and so knowing a foetus's sex renders further tests unnecessary in around 50% of cases.
The UK's Institute of Child Health successfully trialled the test on more than 70 pregnant women.
Details will be presented at a British Society of Human Genetics meeting.
The researchers tested women at risk of having babies affected by X chromosome-linked disorders that usually only affect boys, such as Duchenne muscular dystrophy.
They also tested women at risk of carrying girls with a condition called congenital adrenal hyperplasia (CAH), which causes the genitalia to develop abnormally.
If identified early enough, CAH can be treated in the womb using steroids.
In both cases, the new test revealed the gender of the foetus, weeks before it can be detected by ultrasound.
Team leader Dr Lyn Chitty said: 'The advantages of this test are clear when used in women at high risk of a genetic disorder.
"It allows for earlier determination of foetal sex than was previously possible using either chorionic villus sampling or ultrasound.
"It avoids the risks associated with invasive testing in about half of the women, and in some cases at risk of CAH patients could avoid taking steroids at all when the foetus was found to be male by seven weeks of pregnancy."
Currently, to carry out a prenatal genetic test, scientists must obtain cells from the foetus, using either amniocentesis or chorionic villus sampling (CVS).
Both techniques involve injecting a needle into the womb, which can cause a miscarriage in up to 1% of cases. They also cannot be carried out until at least 11 weeks into the pregnancy.
Because of this, researchers have been trying for some time to develop a non-invasive technique for carrying out genetic tests during pregnancy.
In the latest study, the scientists worked on tiny amounts of 'free foetal DNA' found in the watery part of the mother's blood.
At the moment the technique is limited to identification of genes which are only present in the father and can be passed on to the foetus.
This includes the sex determining genes or the rhesus gene when the father is rhesus positive and the mother rhesus negative.
Research is ongoing to find ways of improving the extraction of free foetal DNA so that more conditions can be diagnosed, such as cystic fibrosis or thalassaemia.
Professor Henry Halliday, an obstetrician at Belfast's Royal Maternity Hospital, said the test could certainly be useful.
However, he said: "I can foresee ethical problems if the test were to be made widely available - in some countries such as India and China there are significant imbalances in birth frequencies of boys and girls - probably due to selective termination of pregnancies with a female foetus.
"Clearly an accurate diagnosis of gender at seven weeks would greatly facilitate early abortion and this modifies one's enthusiasm for this new test."
Professor Nicholas Fisk, of Imperial College London, said similar work had already been reported by a French team.
But he said the latest study could lead to the test becoming more widely available.