An illegal immigrant raped an 18-year-old woman because she was white, Exeter Crown Court has been told.
Black South African Amos Moobeng, 35, lured two women back to the Devon farm at which he was staying in 2007.
After slapping one woman who rejected his sexual advances, Moobeng locked her friend in a room and raped her.
Jailing him for nine years for rape, false imprisonment and assault, the judge said Moobeng targeted the two friends because they were white.
Moobeng was told he would be deported after serving his sentence.
The court heard that Moobeng had met the two women in a hotel bar in Cullompton, Devon in August 2007.
They later tried to get into a nightclub in Exeter, but were turned away and without any money for a taxi, the women reluctantly agreed to spend the night at Moobeng's house.
After one of the women, aged 20, spurned his advances for sex he slapped her and then dragged her teenage friend into a room, locking the door so she could not escape.
Moobeng fled the house after the rape but was found nearby after being tracked by a police dog.
He was found guilty of rape and false imprisonment and admitted assault.
Sentencing Moobeng, Judge Jeremy Griggs said: "That evening you deliberately targeted two white females because they were white.
"You dragged the other girl into the house and locked the doors so she could not escape.
"You dragged her upstairs by the wrists, causing her significant injuries, before subjecting her to a short but violent rape."
Prosecutor David Evans told the court during the eight-day trial that when Moobeng was interviewed he gave a false name, and after being released on bail he disappeared.
After an eight-month search he was arrested again in Edinburgh and taken back to Devon for trial.
The court heard he then told officers that he had given a false name because he was in the country illegally.