William Fraser, 22, abducted, assaulted and racially abused his victim in the Powis area of Aberdeen in October 2012.
The traumatised 22-year-old was forced into a lane and repeatedly punched on the head until she fell to the ground unconscious.
Her masked attacker put a chain round her neck and subjected her to a horrific sexual assault.
She was then dragged to a close and forced to remove her clothing and clean herself with a mop in his attempt to hide the evidence.
Fraser was convicted of rape, abduction, assault and robbery following a trial at the High Court in Edinburgh in November last year.
The jury found him guilty of three charges by a unanimous verdict. He was put on the sex offenders register for an indefinite period yesterday.
Jailing him, Lady Scott said the "appalling nature" of the attack required him to spend a substantial period of time in custody.
She sentenced him to an extended sentence of 13 years. He will spend nine years in custody with four years on licence after his release.
Lady Scott said: "Your victim was left utterly distraught and severely injured. She remains traumatised and has difficulty in coping. It is to her immense credit that she has resumed her full-time studies and has tried to rebuild her life.
"In her evidence, your victim said she was not worried about walking home alone because she felt Aberdeen was the safest place in the world. Among the many things you robbed your victim of that night, was that trust."