A man who used his victim's own mobile phone to film himself raping a sleeping woman changed his plea when he was shown a video of the horrifying attack in court.
Cameron Hassan had maintained his innocence when questioned by police and pleaded not guilty as his trial begun.
But when he took to the stand he dramatically changed his plea after the jury at Swansea Crown Court last month were shown a video of the sex assault.
The 31-year-old returned to the dock on Thursday to be sentenced for anal rape which happened in the Ammanford area of Carmarthenshire, south west Wales, in 2021.
The court heard he has 32 previous convictions for 92 offences including violence against and harassment of women but no sexual offending.
Nicola Powell, for the prosecution, read out a statement from the victim in which she explained the impact the sexual assault had on her including depression and issues trusting people.
The woman also said she had gone through "hell" waiting for the trial and wished the defendant had pleaded guilty to spare her that ordeal.
Paul Hobson, for Hassan, said though only a limited point in mitigation it was the case that Hassan had used the victim's phone to record the assault and had never been in a position to distribute the footage.
He also pointed to a pre-sentence report written by a probation officer who had previously dealt with the defendant which, while detailing "well-founded concerns" about Hassan's behaviour, had also said he had expressed remorse and had the ability to change.
The barrister added that guilty pleas were comparatively rare in such cases and though his client's plea had come late in the day it had spared his victim from having to give evidence.
Judge Geraint Walters said he and the jury had had to watch the video of the sexual assault and that any right-thinking individual would have found it difficult.
He said the footage showed the defendant has "no respect for women at all", adding it was hard to think of a more degrading way of treating a female.
The judge added that after considering the issue of credit he was prepared to give the defendant a 5% discount on the sentence he would otherwise impose as Hassan's plea – though entered during the trial – had come before the victim gave evidence and was cross-examined.
Hassan, of no fixed abode was sentenced to 10 years in prison. He must serve two-thirds of that sentence in custody before he can apply for parole. He will be a registered sex offender for the rest of his life.
Speaking after the sentencing senior investigating officer detective inspector Melanie Havard of Dyfed-Powys Police said the victim had shown great strength and determination throughout the investigation and trial.
She said: "I must commend her tremendous courage in coming forward and the tenacity shown throughout the investigation.
"We appreciate this is not easy for anyone to do but the victim has expressed her gratitude to the officer in the case for her support and empathy throughout this process.
"We hope this case demonstrates that Dyfed-Powys Police acts on serious allegations such as rape and sexual assault with officers working tirelessly to secure justice for victims."