After decades of controversy, the Food and Drug Administration approved a new H.I.V. test on Tuesday that for the first time makes it possible for Americans to learn in the privacy of their homes whether they are infected. The availability of an H.I.V. test as easy to use as a home-pregnancy kit is yet another step in the normalization of a disease that was once seen as a mark of shame and a death sentence. The OraQuick test, by OraSure Technologies, uses a mouth swab and gives results in 20 to 40 minutes. A previous test sold over the counter required a user to prick a finger and mail a drop of dried blood to a lab. Dr. Anthony S. Fauci, the longtime AIDS researcher and director of the National Institute of Allergy and Infectious Diseases, called the new test a "positive step forward" and one that could help bring the 30-year-old epidemic under control. Getting an infected person onto antiretroviral drugs lowers by as much as 96 percent the chance that he or she will transmit the virus to someone else, so testing and treatment have become crucial to prevention. About 20 percent of the 1.2 million infected Americans do not know they have the disease, the Centers for Disease Control and Prevention estimates, and about 50,000 more get infected each year. Dr. Robert Gallo, who headed the National Institutes of Health lab that developed the first American blood test for the virus in 1984, called the F.D.A. approval "wonderful because it will get more people into care." The idea of a home test has long been mired in controversy. The first application for one was made in 1987, and the F.D.A. has been considering OraSure's simple mouth-swab test since 2005. But the history of AIDS and the human immunodeficiency virus that causes it are unique. AIDS emerged in the 1980s wrapped in a shroud of stigma. It was spread by sex, drug injections and blood transfusions. Along with hemophiliacs, heroin users and Haitians, the most vocal group of early victims was gay men, who were then in the throes of a loud and defiant liberation movement. Because merely being tested for H.I.V. was seen as tantamount to being publicly revealed as gay or addicted to drugs, and because an H.I.V.-positive result was a death sentence, groups like the Gay Men's Health Crisis and newspapers like The New York Native advised their members and readers to shun testing until ironclad guarantees of anonymity were put in place. Alarmists predicted a wave of suicides if home tests were made available. At hearings, advocates for AIDS patients handed out copies of an obituary of a San Francisco man who jumped off the Golden Gate Bridge after learning he was infected. C.D.C. officials warned their F.D.A. counterparts that home testing could lead to a surge of new patients that would swamp overburdened health clinics, according to an F.D.A. document. So, even as tests for other stigmatized diseases like syphilis were once part of getting a marriage license and home pregnancy kits became available at every corner pharmacy, H.I.V. tests lived in a special limbo, usually requiring a counseling session and the signing of a consent form, adding to the air of dread. Even when antiretroviral drugs emerged in the mid-1990s, states were slow to rewrite laws governing testing. Mark Harrington, the executive director of the Treatment Action Group, an AIDS advocacy organization, said in an interview that he thought such fears were "a thing of the past" now that it is clear that early treatment saves lives. "Any tool that speeds up diagnosis is really needed," he said. The new test has some drawbacks. While it is extremely accurate when administered by medical professionals, it is less so when used by consumers. Researchers found the home test accurate 99.98 percent of the time for people who do not have the virus. By comparison, they found it to be accurate 92 percent of the time in detecting people who do. One concern is the "window period" between the time someone gets the virus and begins to develop the antibodies to it, which the test detects. That can take up to three months. So, while only about one person in 5,000 would get a false positive test, about one person in 12 could get a false negative. Any positive test needs confirmation in a doctor's office, the F.D.A. said, and people engaged in high-risk sex should test themselves regularly. The agency does not intend for the home test to replace medical testing, but instead to provide another way for people to find out their H.I.V. status, said Dr. Karen Midthun, director of the F.D.A."s Center for Biologics Evaluation and Research. The home test should be available in 30,000 pharmacies, grocery stores and online retailers by October, said Douglas Michels, OraSure's chief executive. The price has not yet been set. But he said it would be higher than the $17.50 now charged to medical professionals because the company will do more complicated packaging for the home kit, open a 24-hour question line, and advertise to high-risk groups, including gay men, blacks and Hispanics, and sexually active adults. Still, he said, it will be kept inexpensive enough to appeal to people who might want to buy several a year. Because the F.D.A. approved the home test only for people 17 and older, retail stores may ask customers to show ID, he said. The restriction is not for medical reasons, but because only a few subjects age 14 to 16 were tested, he said, "so that was the deal we worked out with the F.D.A." Whether having to show identification would deter teenagers or young-looking people from buying a test is unclear. Mr. Harrington said he thought it might. In contrast, teenage girls are not legally required to show identification to buy pregnancy tests. Because of an editing error, an article on Wednesday about federal approval of a rapid H.I.V. test sold over the counter for use at home reversed the odds of a person's getting a false positive or false negative result in taking the OraQuick H.I.V. test. About one person in 5,000 would get a false positive test, and about one person in 12 could get a false negative - not the other way around. The article also described the method of the test incorrectly. It requires a person to swab fluid in the mouth at the gumline; it does not require a cheek swab.