Lukasz Rutkowski, 23, was spotted fondling Tanya Kalonga’s breasts and simulating a sex act while children and adults were swimming nearby.
But when staff and police officers tried to throw the drunken couple out of the public baths they refused and demanded their entrance money back.
During a struggle to remove them from the pool, Kalonga, 21, spat at police officers and a pool attendant and Rutkowski bit one police constable in the leg.
Three police officers and a member of pool staff at Edinburgh’s Ainslie Park Leisure Centre had to wait six months to find out if they had been infected with HIV.
Despite defence claims that the risk of HIV infection was “negligible”, Sheriff Nigel Morrison QC said today the victims had been through a mental and physical ordeal.
Jailing Kalonga for 19 months and sentencing Rutkowski to two years, he said: “I think this is a very serious incident.
“Victims were not to know there was a negligible risk of infection.”
He said one constable in particular faced a different risk “because blood was involved”.
The sheriff added that those at risk also received “unpleasant medical treatment whether it was absolutely necessary or not”.
He told the court: “I think the only appropriate sentence is a custodial one in the circumstances.”
The court heard the couple downed three bottles of spirits between them before running amok.
Defence agent Matthew Auchincloss said: “They had both been drinking and there was a degree of immaturity in the way they reacted to the swimming pool staff when asked to leave.”
Defence agent Melissa Rutherford said Kalonga claimed to social workers that she was “not involved in sexual activity” in the pool.
“She does accept she was kissing and engaging in amorous activity with her partner. She advises they had drunk three bottles of vodka between them,” said the defence agent.
Kalonga had arrived from Zimbabwe when she was 10, said the lawyer.
“Shortly afterwards she was diagnosed with her condition,” she said.
“She advises she has not dealt with the consequences of suffering from this condition. Throughout her childhood she felt isolated and used alcohol to deal with these issues.”
The court had heard two attendants at the pool spotted Polish Rutkowski and Zimbabwean Kalonga in the act just after 3pm.
“They observed a male and a female within the swimming pool with numerous adults and young children,” said fiscal depute Michelle Young.
“At this time Rutkowski was seen to be fondling Kalonga’s breast through her swim suit, exposing them in the process.” They also simulated a sex act, the court heard.
“Both were unconcerned there were children present and that they had gotten the attention of many of the people in the pool,” said the fiscal.
The police were called after Rutkowski threatened to shoot pool supervisor John Kenny and his family, the fiscal said.
When officers arrived the couple were still in the pool and they were once again asked to leave. But one of them shouted “I want my f***ing entrance money back”, the court heard.
They then agreed to leave the pool. Officers then put Rutkowski on the ground where he struggled violently with them.
One officer received a laceration to his hand and Rutkowski was left with cuts to his knee as a result, the fiscal said.
The cut, along with the officer’s clothes, was “contaminated” by Rutkowski’s blood, the court heard.
Both were placed in leg restraints as they were taken out of the building and ferried to a police station.
During the struggle, Kalonga spat at three police officers and Rutkowski called them Nazis and hurled racist abuse, the court heard.
Rutkowski pleaded guilty to lashing out with his arms and legs at one male constable while both men were bleeding at the leisure centre.
He also admitted biting one officer and hurling racist abuse at another.
Kalonga admitted scratching the arms of one police officer and spitting at him and others. She also spat at Mr Kenny.
And at the city’s St Leonard Police Station she spat at another officer and tried to bite her arm..
They had initially been charged with appearing to have sexual intercourse during the August 9 incident, but that element of the allegation was dropped.
They were both said to have known they were HIV positive at the time of the incident. But those claims were also dropped.
The fiscal said “both accused had HIV”.
Both were listed in court papers as being prisoners in Edinburgh Prison.