The genetic data posted online seemed perfectly anonymous - strings of the billions of DNA letters from more than 1,000 people in a study. But all it took was a little clever sleuthing on the Web for a genetics researcher to zero in on the identities of five people he randomly selected. Not only that, he found their entire families, even though the relatives had no part in the study - identifying nearly 50 people.

"We are in what I call an awareness moment," said Eric D. Green, director of the National Human Genome Research Institute at the National Institutes of Health.

The genetic data are from an international study, the 1000 Genomes Project, that is collecting genetic information from people around the world and posting it online so researchers can use it freely. It also includes the ages of participants and the regions where they live. That information, a genealogy Web site and Google searches were sufficient to find complete family trees. While the methods for extracting relevant genetic data from the raw genetic sequence files were specialized enough to be beyond the scope of most laypeople, no one expected it would be so easy to zoom in on individuals.

The researcher did not publish the names he found. But the exercise revealed a growing tension between the advancement of medical research, which often requires making genetic information public so scientists can use it, and protecting the privacy of study subjects.

The paper, published Thursday in the journal Science, follows other reports that identified people whose genetic data were online. But none had started with such limited information: just the long string of DNA letters, an age and, because the study focused on only American subjects, a state.

"I've been worried about this for a long time," said Barbara Koenig, a researcher at the University of California in San Francisco who studies issues involving genetic data. The new paper is "amazing," she added, but "we always should be operating on the assumption that this is possible."

There is no easy answer about what to do. Make study subjects more aware that they could be identified by their DNA sequences? Keep more data locked behind security walls? Institute severe penalties for those who invade the privacy of study subjects? None of the above?

"We don't have any claim to have the answer," Dr. Green said. And opinions about just what should be done vary greatly among experts.

But after seeing how easy it was to find the individuals and their extended families, the N.I.H. removed people's ages from the public database, making it more difficult to identify them.

But Dr. Jeffrey R. Botkin, associate vice president for research integrity at the University of Utah, which collected the genetic information of some research participants whose identity was breached, cautioned about overreacting. Genetic data from hundreds of thousands of people has been freely available online, he said, yet there has not been a single report of someone being illicitly identified. He added that "it is hard to imagine what would motivate anyone to undertake this sort of privacy attack in the real world." But he said he had serious concerns about publishing a formula to breach subjects' privacy. By publishing, he said, the investigators "exacerbate the very risks they are concerned about."

The project was the inspiration of Yaniv Erlich, a human genetics researcher at the Whitehead Institute, which is affiliated with M.I.T. He stresses that he is a strong advocate of data sharing and would hate to see genomic data locked up. But when his lab developed a new technique, he realized he had the tools to probe a DNA database. And he could not resist trying.

The tool allowed him to quickly find a type of DNA pattern that looks like stutters among billions of chemical letters in human DNA. Those little stutters - short tandem repeats - are inherited. Genealogy Web sites use repeats on the Y chromosome, the one unique to men, to identify men by their surnames, an indicator of ancestry. Any man can submit the short tandem repeats on his Y chromosome and find the surname of men with the same DNA pattern. The sites enable men to find their ancestors and relatives.

So, Dr. Erlich asked, could he take a man's entire DNA sequence, pick out the short tandem repeats on his Y chromosome, search a genealogy site, discover the man's surname and then fully identify the man?

He tested it with the genome of Craig Venter, a DNA sequencing pioneer who posted his own DNA sequence on the Web. He knew Dr. Venter's age and the state where he lives. Bingo: two men popped up in the database. One was Craig Venter.

"Out of 300 million people in the United States, we got it down to two people," Dr. Erlich said.

He and his colleagues calculated they would be able to identify, from just their DNA sequences, the last names of approximately 12 percent of middle class and wealthier white men - the population that tends to submit DNA data to recreational sites like the genealogical ones. Then by combining the men's last names with their ages and the states where they lived, the researchers should be able to narrow their search to just a few likely individuals.

Now for the big test. On the Web and publicly available are DNA sequences from subjects in the 1000 Genomes Project. People's ages were included and all the Americans lived in Utah, so the researchers knew their state.

Dr. Erlich began with one man from the database. He got the Y chromosome's short tandem repeats and then went to genealogy databases and searched for men with those same repeats. He got surnames of the paternal and maternal grandfather. Then he did a Google search for those people and found an obituary. That gave him the family tree.

"Now I knew the whole family," Dr. Erlich said. And it was so simple, so fast.

"I said, 'Come on, that can't be true.'" So he probed and searched and checked again and again.

"Oh my God, we really did this," Dr. Erlich said. "I had to digest it. We had so much information."

He and his colleagues went on to get detailed family trees for other subjects and then visited Dr. Green and his colleagues at the N.I.H. to tell them what they'd done.

They were referred to Amy L. McGuire, a lawyer and ethicist at Baylor College of Medicine in Houston. She, like others, called for more public discussion of the situation.

"To have the illusion you can fully protect privacy or make data anonymous is no longer a sustainable position," Dr. McGuire said.

When the subjects in the 1000 Genomes Project agreed to participate and provide DNA, they signed a form saying that the researchers could not guarantee their privacy. But, at the time, it seemed like so much boilerplate. The risk, Dr. Green said, seemed "remote."

"I don't know that anyone anticipated that someone would go and actually figure out who some of those people were," Dr. McGuire said.