A 33-year-old man who raped a woman at knifepoint has been told he will stay in jail until he is no longer considered a danger to the public.
Daniel Cain, of Beech Court, Dereham, Norfolk, was found guilty of raping the woman in his flat in July.
The jury at Norwich Crown Court also found him guilty of false imprisonment.
Judge John Barham said Cain would serve at least five years before he could be considered for release by the parole board, if it is safe to do so.
He said if it is not considered safe to release him, Cain will remain in prison.
"I considered you to be a significant risk to the public by further offending," said Judge Barham.
Cain, who has 24 previous offences - many for violence, had denied the offences but was found guilty by a jury.
In an impact statement the victim of the attack said she had problems sleeping and was too scared to go out unaccompanied.