Kyle McKenzie, from Glenrothes in Fife, wore a balaclava when he entered the 83-year-old’s home in June 2019. He threatened her with a garden tool before attacking and raping her.
The pensioner managed to raise the alarm and the 23-year-old was caught after DNA left at the scene was linked to him.
At the High Court in Edinburgh in November, he admitted rape and breaking into another home before the attack.
On Friday, McKenzie was jailed for 11 years at the same court.
He was also made subject to a five-year extended supervision order on release, and must sign the sex offenders register.
After the sentencing, Detective Inspector Darren Stewart, senior investigating officer at Police Scotland, described McKenzie as a “very dangerous, opportunistic individual”.
He added: “He carried out particularly brutal attack on a vulnerable woman, submitting her to a harrowing ordeal in the one place in the world she should have been safest, her own home.
“He showed no contrition for his reprehensible behaviour when he was charged. However, he will now face the consequences of his actions having admitted his guilt.”
McKenzie was given a nine-month sentence for theft by housebreaking, and an 11-year prison term for the rape. They are to run concurrently.
Fraser Gibson, procurator fiscal for High Court sexual offences, said the victim had “shown remarkable bravery and resilience during the prosecution process”.