The court sentenced the physician to ten months imprisonment for reckless endangerment and was also ordered to pay 26,900 kronor ($3,512) in compensation to one of the men.
One of the two men has been diagnosed with HIV, but the court argued that it can not be ruled out that he was infected by someone else. The second man is not HIV positive.
Lawyer Elisabeth Massi Fritz, representing the two men, told news agency TT that the ruling will be appealed.
"The prosecutor and I agreed that we would appeal if any of the charges were to be dismissed."
The man was facing a further charge of aggravated assault, with an alternative charge relating to causing the HIV infection. These charges were dismissed by the court as it could not be concluded that the doctor was responsible for the infection.
Elisabeth Massi Fritz says she is not surprised at the verdict but expressed disappointment that one of the charges was dismissed.
"There can be no other person that has infected my client. But we have to obtain a supplementary investigation to prove this," said Massi Fritz.
The district court concluded in its ruling that the doctor's actions had threatened the lives of the men and that his offence should be considered especially serious, given that in his professional capacity he should be aware of the Swedish Institute for Infectious Disease Control (SMI) rules of conduct.