A migrant who was jailed after raping a young boy at a swimming pool has had his sentence overturned – as the court couldn’t prove he knew the child said no.

The incident occurred when the vile attacker, identified as 20-year-old Amir A, visited Theresienbad pool in Vienna, Austria, as part of an integration process last December.

The Iraqi, who reportedly worked as a taxi driver after entering Austria via the Balkans, had also been provided with a 15-year-old helper and translator.

He brutally sexually assaulted the 10-year-old boy in the pool’s changing room – before returning for a swim, later claiming it was a “sexual emergency” as he hadn’t had sex for four months.

After the boy alerted a lifeguard, police arrested the man at the scene and the boy was taken to hospital with severe internal injuries. The victim, whose mother is from Serbia, continues to suffer from severe post-traumatic stress disorder.

The attacker was later found guilty of serious sexual assault and rape of a minor, and received a sentence of six years in jail.

But, shockingly, the Supreme Court has now lifted the verdict – after accepting the defence lawyer’s claim that the lower court had not done enough to ascertain whether or not the rapist had realized the schoolboy was saying no.

Supreme Court President Thomas Philipp said that while the verdict was “watertight” with regard to the serious sexual abuse of a juvenile, the written verdict on the second indictment, rape, cannot be sufficiently proved.

The 20-year-old is expected to remain in custody until the second trial takes place, when a new sentence will be imposed.

It is believed the new legal process will take place in 2017.