The provision, included in a new state law being considered on public safety and security, is supposed to protect people such as police officers and emergency medical technicians whose jobs include a particularly high rate of infection, , officials said.
State interior ministry officials denied an earlier report in the regional newspaper Mittledeutsche Zeitung, that the law would target people in specific risk groups, such as homosexuals, drug abusers, the homeless, and foreigners.
"That is false," state Interior Ministry spokesman Michael Kraska told The Local.
His office argues that several other German states, including Hamburg and Hesse, already have such provisions in effect. "We're a normal state," he said.
The provision would enable for example, an emergency medical technician accidentally stuck by a needle from someone thought to be infected with HIV or hepatitis, to ask a judge to force that person to be tested. That judicial approval could come quickly over the phone, Kraska said.
Until now the person suspected of having HIV or hepatitis would have to agree to such a test.
Current news on the measure provoked outrage in gay and lesbian and AIDS relief circles - just a day before international World AIDS day, December 1.
Markus Ulrich, of the Lesbian and Gay Federation of Germany (LSVD), said in a statement: "In the opinion of the LSVD, the planned forced HIV test is a completely unnecessary stigmatization of groups of people, without any medical benefit. It abets discrimination, of all things, one day before World AIDS day."
He said the forced tests were based on irrational fears and prejudices, and that the federal Interior Ministry had questioned their constitutionality. And he pointed to figures from the Robert Koch Institute, which show that 0.05 percent of the population in Saxony-Anhalt was HIV positive.
The measure is currently being considered by a state parliamentary committee, where it can be discussed and debated, according to the state Interior Ministry. The ministry argues that the state's law regulating police conduct was one of the few in Germany with an explicit ban on discrimination based on sexual identity.