Dr. Kari Stefansson can trace his ancestry back 1,100 years. That's almost unheard of in the U.S., but in his native Iceland, where genealogy is a national obsession, it hardly raises an eyebrow. The island nation is a genetic anomaly: settled by a few Norsemen and Celts in the 9th century A.D. and relatively free of later immigration, it is among the most genetically homogeneous countries on earth. And in the late 1990s, when scientists were racing to map the human genome, Stefansson realized that Iceland's genetic isolation and unrivaled genealogical records made it a potential gold mine for isolating genes.

Thus began Iceland's great genetic experiment, an attempt to mine the gene pool of an entire country in search of the root causes of--and potential cures for--some of the world's worst diseases. And after years of controversy, dashed hopes and burst stock bubbles, the effort is finally paying off. Over the past decade, deCODE Genetics, the company Stefansson co-founded in his home city of Reykjavík, has discovered more than a dozen genes linked to diseases ranging from stroke to schizophrenia. Last month, deCODE announced that it had found a gene that boosts the risk of Type 2 diabetes. And within a few weeks, the company will start the final phase of trials for a drug based on a newly identified heart-attack gene that appears to be especially dangerous in African Americans. "I'm very enthusiastic," says Dr. Francis Collins of the U.S. National Institutes of Health and leader of the Human Genome Project. "What deCODE is doing is clearly exciting, and I congratulate them."

In principle, their method is straightforward: to find a disease-related gene, find someone with the disease, then see how his or her DNA differs from the DNA of healthy people. In practice, however, individual genes rarely cause illness on their own; instead, they tend to make people more susceptible. And in places with genetically mixed populations, the complex interaction among genes makes it hard to find the risky ones. But in Iceland, with its uniform population and genealogies that show how everyone is related, risky genes tend to stand out. The country's meticulous medical records provide even more data.

Ingenious as it was, Stefansson's plan quickly ran into problems. In order to build a database of genomes, deCODE needed blood samples from as many Icelanders as possible, as well as access to their health records. Parliament granted permission to tap into those records, along with an exclusive license to assemble, maintain and market the resulting data. Thousands of citizens donated blood, and many bought shares in deCODE as well. But those shares, which rose to a high of $65 in a frenzied run-up in 1999 and 2000, plunged to as low as $2 in the collapse of the dotcom bubble. They're around $9 today--and deCODE still hasn't turned a profit. Investors lost a lot of money, and the firm was forced to lay off scores of employees.

Then in 1998 the U.S. firm Hoffmann--La Roche agreed to pay $200 million for the right to develop drugs based on some of deCODE's data. The idea that a foreign company might profit from their personal information made many Icelanders balk. A woman named Ragnhildur Gudmundsdottir sued to keep her deceased father's medical records from going into the deCODE-run database, citing a right to privacy, and in 2003 Iceland's supreme court ruled in her favor.