A brave schoolgirl rang 999 as her mother was being raped by an intruder in their home.
Saif Hussain, 27, was arrested after the girl hid upstairs and called the police, telling them to come quickly.
The schoolgirl has been praised for her actions after Hussain was jailed for nine years at Cardiff Crown Court.
The youngster testified against the defendant during the trial, where he was found guilty of one count of rape and one count of assault by penetration.
The court heard Hussain "degraded" his victim after forcing his way into the house and attacking her as the girl hid upstairs.
Prosecutor Roger Griffiths said Hussain knew the girl was upstairs and could hear her mother's cries.
In a victim impact statement, the mother said: "My daughter has not gone back to school since this happened.
"Seeing my daughter cross-examined is not something a girl should ever have to deal with, but she did it for me. I couldn’t stop thinking about how alone she felt in there."
She added: "My daughter has missed a large amount of school which has impacted her mental health so negatively.
"She is such a bright girl but I worry about how much she is falling behind. If all of this hadn’t happened she would have been able to carry on as normal."
Hussain, of Newport, Gwent, was sentenced on 4 November to nine years in prison.
He was also handed a 10-year restraining order banning him from contacting his victim.
Judge Michael Fitton told him he was "overbearing, abusive, and violent" and there were "a number of concerns" over his treatment of women.
He said: "You are not helped by the fact that you have shown not a shred of remorse or understanding of what you did.
"You knew that her daughter was upstairs. She was so frightened that she called the police.”
Speaking after the sentence, police investigator Emily Harris, added: "Hussain has, at every turn, denied responsibility for his actions and has shown no empathy or remorse throughout this process.
"I commend the unwavering courage of the victim and her daughter throughout this ordeal and hope that this sentence allows them to move on with their lives and provides the closure they’ve so desperately needed."