COLUMBUS, Ohio — An Ohio law requiring HIV-infected individuals to tell sexual partners of their status before having sex or risk criminal charges is unconstitutionally based on outmoded stigmas against the gay community and doesn't take into consideration current survival rates for people with HIV, say lawyers challenging the law in a case before the state Supreme Court.

Ohio's HIV assault law also violates free speech rights because it focuses only on disclosure, not the actual transmission of the disease, say attorneys arguing against the law on behalf of an Ohio man convicted of failing to tell his girlfriend he had HIV after they started having sex.

The Supreme Court Of Ohio on May 18, 2014 in Columbus, Ohio. Raymond Boyd / Getty Images

Breaking the law is considered a felonious assault with a possible prison sentence of up to eight years.

"The targeting of HIV and no other chronic illnesses reinforces the notion that HIV is a death sentence, which does not reflect the medical reality of HIV," Raymond Faller, a public defender representing defendant Orlando Batista, said in a court filing last year.

The law discourages people from getting tested for HIV, since individuals can't be prosecuted if they don't know their status, Faller said. There's also evidence showing people take sexual risks with partners despite knowing they're HIV positive.

Focusing on sexual transmission ignores the other ways HIV can be transmitted, including by needles, Faller said.

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"It is akin to trying to end wars by banning swords," he said.

Prosecutors argue the law upholds a compelling state interest in discouraging exposure to and spread of an incurable disease.

Related: 'Double Discrimination' Contributes to Bisexual Health Disparities, Study Says

The law does not require abstinence, limit sexual conduct to a certain type or dictate use of safe sex measures, Paula Adams, an assistant Hamilton County prosecutor, said in a February court filing.

The law "simply ensures that sexual conduct under these circumstances is truly consensual and hopefully from there, common human decency will prevail and those consenting adults will make prevention decisions as they see fit," she said.

The law is not a free speech violation because it covers both the failure of a partner to explain something and having sex without a partner being fully informed, Adams said.

The state Supreme Court is expected to rule by this fall.

Related: New App Will Connect LGBTQ Patients to Inclusive Doctors

In Missouri, a former college wrestler is using similar arguments to challenge his conviction and 30-year sentence for infecting another man with HIV and endangering four other sexual partners.

Thirty-four states including Missouri and Ohio have HIV-specific assault laws, according to the New York-based Center for HIV Law and Policy. More than 300 people have been charged under these laws since 2008, the center says.

The Centers for Disease Control and Prevention estimates 1.1 million people live with HIV in the US, with 1 in 7 of them not knowing it. The estimated number of annual HIV infections declined 18 percent from 2008 to 2014, according to the CDC.

Follow NBC Out on Twitter, Facebook and Instagram