African Joachim Cardos threatened to kill his victim as he brutally attacked her and forced her to carry out sex acts before she managed to flee.
Following the verdict his defence team said he was “almost certain” to be deported, and said they could think of no grounds to appeal against that.
Judge Lord Hardie told Cardos at the High Court in Edinburgh: “The evidence disclosed a violent and persistent attack upon a defenceless young woman for your sexual gratification.”
The judge added: “It was apparent from her testimony that the effects of your conduct have been devastating.
“Your victim was repeatedly threatened with a knife, threatened with being killed and she was raped.
“She genuinely thought she was going to die. Her life has changed and she no longer feels safe.”
He said Cardos had been assessed as a high risk of sexual reoffending and of posing a danger to women.
Lord Hardie jailed Cardos for eight years for the rape and a further three years for peddling cannabis.
The court heard he was selling the drug for 22 months to earn money as he could not seek legitimate work because of his immigration status.
The judge also ordered that he be kept under supervision for a further four years, but added that might be academic if Cardos was deported.
Cardos, 32, from Gambia, had denied raping the woman at his flat in Edinburgh on October 22 last year, but was earlier convicted of the crime by a jury.
The judge had earlier said that any issue over deporting Cardos was a matter for the Home Secretary.
His 26-year old victim said she had gone to his flat in the city’s Dalry Road and bought two bags of cannabis, but as she got ready to leave he tried to kiss her, then grabbed her and shoved her into a bedroom.
The woman told the court: “I could just see his eyes widen and his nose flare. It just looked like an angry face.
“He said he was going to kill me. He said to me: ‘Do you know how many people I have killed?’”
Defence solicitor advocate Jim Keegan QC said he considered it a certainty that Cardos would be deported.