During the trial, Mr. Campbell, who prosecutors say has been H.I.V. positive since 1994, denied that he had resisted arrest or spit at an officer, his lawyer, Russell Henrichs, said Thursday.

Mr. Henrichs added that his client had been indicted under a habitual-offender statute that increased the penalty in his case to a minimum of 25 years in prison, because he had been convicted of attacking two other officers in a similar manner and biting two inmates, as well as more than two dozen other offenses.

“You can see why we thought that we needed to get this guy off the streets,” said Jenni Morse, who prosecuted the current case.

None of the three officers attacked by Mr. Campbell contracted H.I.V., Ms. Morse said.

After Mr. Campbell was convicted by a jury, he shouted at the prosecutor and police officers, calling them liars and telling them to “rot in hell” for “railroading an innocent man.” He was forced to listen to the rest of sentencing from a holding cell.

Mr. Campbell waived his right to appeal and is awaiting transfer from the Dallas jail to prison.

According to the Centers for Disease Control and Prevention, H.I.V. is primarily spread through sexual contact or the exchange of blood. Although there have been rare cases of transmission through severe bites, “contact with saliva, tears or sweat has never been shown to result in transmission of H.I.V.,” the agency reports.