An Algerian man who almost killed his 25-year-old student victim as he raped her in a darkened alley has been jailed for eight years.

The man, identified only by his first name Rheda, is believed to have shouted 'Inshallah' - meaning if Allah wills it - as he attacked his victim as she walked home from a disco at 5am in Hannover.

Afterwards, after badly beating his victim, the 37-year-old man is believed to have asked if she enjoyed it.

Guilty: An Algerian man has been jailed for eight years after violently raping a 25-year-old German student as she walked home from a nightclub in Hannover (file image)

He consistently denied attacking the student, despite the fact he was identified by the woman and had her blood on his clothes when he was arrested.

The young woman, identified only as Lara, said it was the worst moment of her life.

'He asked me in broken German if I had the time,' she told the court.

'Before I could reply he grabbed me by the arm and pulled me down an alleyway. He told me "I need sex".

'I opened my mouth to scream but he put his hand over my mouth. I had a pepper spray, and I tried to spray it at him but he grabbed it off me and used it on me instead.

'Then he threw me to the ground and tried to pull off my trousers but he couldn't do it. Then he started screaming at me to get undressed.'

She told the court that she was terrified he was going to kill her during the violent attack.

The young woman said she had tried to buy some time by begging him to leave her alone, but nobody came past.

Attack: The man, identified only by his first name Rheda, is believed to have shouted 'Inshallah' - meaning if Allah wills it - as he attacked his victim (file image of Hannover)

When she tried to scream again, she said, he started beating her in the face and sprayed her again with the pepper spray.

He banged her head on the ground repeatedly until she was almost unconscious, she added.

'He put his hand over my mouth and closed my nose, and I thought I was going to suffocate,' she continued.

'I then indicated to him that I had given in and would do what he wanted if he let me breathe.'

She continued: 'Afterwards he asked me if it was good, and if I had enjoyed it. I never would have thought something like that could happen to me. I just couldn't comprehend it.'