A man accused of trying to rape a 76-year-old woman in her home has told a trial that he hit her three times to stop her becoming "hysterical".
Ryan Liddell, 20, also told the High Court in Dumbarton he entered the woman's home in Dunblane, Perthshire, "because he wanted to save somebody".
He said that since the allegations about him had emerged, his friends had deserted him and his car vandalised.
Mr Liddell denies assaulting the woman with intent to rape on 14 June 2010.
Speaking from the witness box, the accused said he found the door to the woman's house ajar after going for a walk in the middle of the night.
He said: "I know it's going to sound silly but I went in because I thought I might have the chance to save somebody.
"I've always had this fantasy of being a hero, and I thought someone might be in trouble. I was there to offer assistance and to stop any burglar.
"I looked in and there was a naked woman. She screamed because I was in her house, which is perfectly reasonable."
He said the woman then pushed his arm which was "stuck in the door", and as he pushed to get away, the door hit the woman, knocking her to the ground.
Sick three times
He added: "After a while she became hysterical and I remembered that in cartoons when there is someone hysterical, you slap them, so I slapped her three times on the face.
"I thought it would stop her screaming."
Mr Liddell then said he panicked but kicked the woman in the face after she grabbed hold of his leg as he was leaving.
He told Jamie Gilchrist QC that after leaving the woman's flat he rushed home and was sick three times.
During cross examination by advocate depute Jennifer Bain, Mr Liddell admitted that he had lied to police about his involvement in the incident in order to "protect himself".
He added: "I was just telling police what they wanted to hear. I was basically telling them white lies."
Ms Bain said: "You've lied to police officers and you've lied on tape.
"Is it not the case that you're lying on oath today and you're even lying to yourself aren't you?"
He replied: "I'm not lying."
Ms Bain said: "It would horrify people that a 19 or 20-year-old man would want to have sex with a 76-year-old woman but that is something you wanted that day isn't it?"
He replied: "No. I found it quite disgusting."
Ms Bain then asked: "Do you think it's acceptable that a grandmother and mother can no longer return to independent living after what happened, and that her family had to find her lying injured in her own home?"
He replied: "No, but if I wasn't there someone else would have found her naked."
The Crown dropped charges that Mr Liddell attempted to defeat the ends of justice by washing his blood-stained clothing after the alleged attack in a bid to destroy evidence and that he drove while unfit through drink or drugs on the day of the alleged incident.