The U.S. Food and Drug Administration announced Tuesday it will drop its 31-year ban on gay and bisexual men donating blood, as the science of HIV detection and treatment advances. The ban dates from the first, terrifying years of the AIDS epidemic.

But the lifting of restrictions is only partial and excludes men who have had sex with other men in the previous 12 months, effectively shutting out all but the most sexually abstinent blood donors.

“The first and last time I donated blood was in college in the early '80s,” said Stuart Gaffney, a 52-year-old San Francisco resident who has been with his now-husband, John, for 27 years. “I’m hoping it’s a preliminary step toward actually having a fair policy, but I won’t be giving blood until then.”

The FDA enacted the ban in 1983 during the early years of the AIDS epidemic, when public health officials were trying to figure out why gay men were suddenly suffering collapsed immune systems and contracting bizarre, lethal infections. HIV, the virus that causes the immune deficiency, had not even been discovered yet, so there was no test for it. Three decades later, increasingly sophisticated tests can detect the presence of the virus in the blood closer and closer to the time of infection.

“The FDA has carefully examined and considered the available scientific evidence relevant to its blood donor deferral policy for men who have sex with men,” said a statement from FDA Commissioner Margaret A. Hamburg, who said her agency will announce more details next year after receiving public comments about the change in policy.

While the move isn’t a complete lifting of a ban that has targeted gay men, it follows a similar change in policy in Britain in 2011. The New York Times reported that the shift in policy could increase the nation’s blood supply by as much as 4 percent, but Gaffney, a spokesman for advocacy group Marriage Equality USA, questioned how many people will be able to honestly tell a health official they haven’t had sex in the previous 12 months, a question that under the reformed rules would still single out gay men.

“There has never been a ban on sex workers giving blood, even though they could have a higher risk [of HIV infection],” he said. “There always has been this specificity toward banning gay men.”