A simple blood test that can determine a baby’s sex as early as seven weeks into pregnancy is highly accurate if used correctly, a finding that experts say is likely to lead to more widespread use by parents concerned about gender-linked diseases, those who are merely curious and people considering the more ethically controversial step of selecting the sex of their children.

The appeal of the test, which analyzes fetal DNA found in the mother’s blood, is that it can establish sex weeks earlier than other options, like ultrasound, and is noninvasive, unlike amniocentesis and other procedures that carry small risks of miscarriage. The finding came in a study published online Tuesday in The Journal of the American Medical Association.

The tests have been available to consumers in drugstore chains and online for a few years, but their use has been limited, partly because their accuracy was unclear. One company, which guaranteed 99.9 percent accuracy as early as five weeks into pregnancy, filed for bankruptcy after a lawsuit by scores of women whose tests showed the opposite sex of the baby they ended up having.

European doctors now routinely use the tests to help expectant parents whose offspring are at risk for rare gender-linked disorders determine whether they need invasive and costly genetic testing. For example, Duchenne muscular dystrophy affects boys, but if the fetus is not the at-risk sex, such tests are unnecessary. But doctors in the United States generally have not prescribed the tests because they are unregulated and medical labs are not yet federally certified to use them.

That and other aspects of the pregnancy landscape could change as a result of the new study. The journal study analyzed reams of research on fetal DNA tests — 57 studies involving about 6,500 pregnancies — and found that carefully conducted tests could determine sex with accuracy of 95 percent at 7 weeks to 99 percent at 20 weeks.

The study “has wide-reaching implications,” said Dr. Louise Wilkins-Haug, director for maternal-fetal medicine and reproductive genetics at Brigham and Women’s Hospital in Boston, who was not involved in the research. “Individuals need to be careful” to ensure that companies use rigorous laboratory procedures and support accuracy claims with data, she added.

One potential worry is that women might abort fetuses of an undesired sex. Several companies do not sell tests in China or India, where boys are prized over girls and fetuses found to be female have been aborted. While sex selection is not considered a widespread objective in the United States, companies say that occasionally customers expressed that interest, and have been denied the test. A recent study of third pregnancies in the journal Prenatal Diagnosis found that in some Asian-American groups, more boys than girls are born in ratios that are “strongly suggesting prenatal sex selection,” the authors said.

At least one company, Consumer Genetics, which sells the Pink or Blue test, requires customers to sign a waiver saying they are not using the test for that purpose. “We don’t want this technology to be used as a method of gender selection,” said the company’s executive vice president, Terry Carmichael. Sex-determination tests are part of a new frontier of fetal DNA testing, which can be used to determine paternity and blood type, and is being used to develop early screening tests for genetic diseases like Down syndrome.

The new study found that to be reliable, the sex-determination tests had to be performed after at least seven weeks of gestation. Most tests that were highly accurate were conducted on a mother’s blood, not urine. And certain rigorous laboratory procedures had to be followed. For the blood tests, women prick their fingers and send blood samples to labs. If the Y chromosome is detected, the fetus is male. Absence of a Y chromosome would probably mean the fetus is female, but could mean that fetal DNA was not found in that sample.

The tests are not regulated by the Food and Drug Administration because they are not used for medical purposes, a spokeswoman said, but the agency is investigating the explosion of home genetic tests like these and genome-sequencing kits.

Dr. Diana Bianchi, executive director of the Mother Infant Research Institute at Tufts Medical Center in Boston and the lead author of the sex-determination report, said, “A very important aspect of the study is how this advances prenatal care.”

But there are potential concerns too, she said, including that women may spend more than $250 for the tests when they don’t have insurance for prenatal care. A typical blood test like Pink or Blue, for example, costs $25 for the kit. Lab fees and shipping costs, which vary, bring the total expense to $265 to $330.

Dr. Bianchi is conducting another study to “try to find out why people are buying these things and what are the consequences,” she said. “It’s very important to educate health care providers that pregnant women are buying these tests.”

Another type of test not studied by the researchers has become popular because it is cheaper and can be done at home. These tests analyze hormones in women’s urine, a method that several experts said has not been studied as rigorously as DNA. Rebecca Griffin, a founder of the biggest seller, Intelligender, said two independent studies found it 90 percent accurate at 10 weeks.

Another company, TrovaGene, has developed a DNA test using urine, which, according to Gabriele Cerrone, TrovaGene’s co-founder and director, is 95 percent accurate at predicting boys at seven weeks, and 88 percent accurate at predicting girls. TrovaGene is also developing a test for Down syndrome.

Most DNA tests on the market use blood.

Raylene Lewis, 34, of College Station, Tex., had a frustrating experience with a now-defunct company, Acu-Gen, which guaranteed 99.9 percent accuracy with its blood tests. In 2005, she was told she was having a boy, and she chose a name, bought boy clothes and told everyone. When an ultrasound revealed she was carrying a girl, “I was absolutely shocked,“ she said. She was not unhappy, she said, but “it was like the baby boy disappeared.”

When the Lewises complained to Acu-Gen’s president, they were told, “We are very sure that genetically you are having a male,” she said, reading a transcript of the conversation, which they recorded. The official suggested that the baby might be “what a baby girl looks like on the outside,” but that “we’re giving you the results on the inside.”

Ms. Lewis, who sued Acu-Gen, said she ultimately received a refund. Lawyers for Acu-Gen could not be reached for comment.

The Pink or Blue test, which claims 95 percent accuracy at seven weeks and gives refunds for wrong results, appears to meet the standards described in the new study.

Chelsea Wallace, 23, of Okeechobee, Fla., was thrilled early this year when the test she took at seven weeks said she was having a boy, a result confirmed weeks later by ultrasound. Ms. Wallace, who has a 3-year-old daughter, said she also would have been happy with a girl, but that since she and her fiancé could not agree on a boy’s name, finding out early gave them time to choose the name Layton. It also helped her plan, she said.

“As soon as I found out I was pregnant,” said Ms. Wallace, whose son is due in September, “I wanted to know what I was having.”