Boy or girl? New research finds that a simple blood test can answer that question for expectant parents at just seven weeks, significantly earlier than results from procedures like ultrasound and with less risk than invasive tests like amniocentesis, which can trigger miscarriage.

Families that have a history of gender-linked diseases will undoubtedly welcome the test, since it can help identify at-risk babies early on. But experts worry that some couples will take advantage of the blood screen to select the sex of their child.

The test scans the mother’s blood for fetal DNA, searching for fragments of the Y, or male, chromosome to determine whether she is pregnant with a son. Ultrasounds that can determine sex are not typically scheduled until the second trimester, while other procedures such as chorionic villus sampling or amniocentesis carry a small risk of miscarriage.

The research, published online on Tuesday in the Journal of the American Medical Association, reviewed 57 previous studies of the test, which measures what’s known as cell-free fetal DNA. Overall, results were correct 94.8% of the time when predicting between seven to 12 weeks that a boy would be born, and 98.9% of the time for girls. Accuracy improved with gestational age; after 20 weeks, the test results were near perfect.

But even small margins of error may prove too great if parents will end a pregnancy on the basis of the risk of sex-linked diseases like hemophilia, which typically affects males, or if they are seeking a child of one sex over the other.

“In an ideal world, if there’s a serious or life-threatening genetic problem with the fetus, I understand people will want to end this pregnancy and try again,” says Art Caplan, director of the Center for Bioethics at the University of Pennsylvania. “But when you’re talking about picking a baby’s sex, doctors shouldn’t offer the test, companies shouldn’t offer it, and we should tell people that’s not a good reason to have an abortion.”

(MORE: Gender-Free Baby: Is It O.K. for Parents to Keep Their Child’s Sex a Secret?)

For now, the debate is mostly speculation in the U.S., where the test — estimated to cost more than $400 — is not as widely available as it is in Europe. “It is being used in Europe for medical indications, and there’s no reason it shouldn’t be used in the U.S. for medical indications,” says Diana Bianchi, the study’s lead author and a reproductive geneticist who heads the Mother Infant Research Institute at Tufts Medical Center.

“I’m not naïve,” she added. “We realize it could be used for family balancing.”

Some companies market similar blood tests online, and others sell them in drugstores while emphasizing that they are not to be used for prenatal sex selection. (The new study included data only on tests used in doctors’ offices, not on those offered direct to consumers.)

According to the Associated Press:

Consumer Genetics Inc., a Santa Clara, Calif.-based company sells an “early gender” blood test called “Pink or Blue” online for $25 plus $265 or more for laboratory testing. It boasts of 95 percent accuracy, using a lab technique its scientists developed from the type of testing evaluated in the new analysis, said Terry Carmichael, the company’s executive vice president. Carmichael said the company sells more than 1,000 kits a year. He said the company won’t test blood samples unless women sign a consent form agreeing not to use the results for gender selection. The company also won’t sell kits to customers in China or India because of fears of gender selection, he said.

In the U.S., using abortion to select for gender is not as common a practice as it is in some Asian countries, where boys are valued over girls. But American couples have selected sex by taking advantage of a technology called pre-implantation genetic diagnosis (PGD), in which embryos are screened for familial genetic diseases before being transferred to a woman’s uterus during in vitro fertilization. In 2006, research published in the journal Fertility and Sterility found that 42% of clinics that offer PGD for genetic purposes also offer sex selection.

Should the blood test be made widely available in the U.S., professional guidelines need to be developed, says Caplan, noting that the ongoing debate over abortion in the U.S. will make it difficult: “One side will scream that we have to stop all abortions, and the other side won’t want to say anything because then they will have to give up all rights to an abortion. No one will want to touch it.”

(MORE: Can a New Blood Test Make Babies with Down Syndrome Disappear?)

Yet as more genetic tests hit the market, ethical pitfalls will only multiply. In January, I wrote about researchers in Hong Kong who announced a test that analyzes a mother’s blood for indications of Down syndrome. The development raised some unsettling questions for Brian Skotko, a doctor in the Down syndrome program at Children’s Hospital Boston who also chairs the clinical advisory board for the National Down Syndrome Society. “Will babies with Down syndrome slowly disappear, then babies with trisomy 18 and trisomy 13?” says Skotko. “As a clinician, I raise it as an open question. It’s a question of which forms of life are valuable.”

Of course, in reality, efforts at gender selection have been going on forever. Women have been advised to time having sex meticulously near ovulation to ensure a boy. Last year, researchers announced that nuts and dairy aided in conceiving a girl. Even the Talmud, an ancient Judaic text, has weighed in, recommending a north-south orientation of the marriage bed in order to bear a son.

“The desire to know someone’s sex was not generated by genetic technology,” says Toby Schonfeld, a bioethicist at Emory University School of Medicine. “To the extent that getting this information early can make the decision about terminating less traumatic, physically and emotionally, it’s generally a good thing. But is it a reasonable social value to say, Look, I’ve got a boy, and I want a girl? I don’t know.”

Bonnie Rochman is a reporter at TIME. Find her on Twitter at @brochman. You can also continue the discussion on TIME‘s Facebook page and on Twitter at @TIME.