John Allan invited the victim to his home after an early morning meeting and subjected her to the assault after deciding his “luck was in”.
A judge told Allan: “You have been convicted of the rape of a very vulnerable woman who was incapable of consent. She was a stranger to you.”
Lady Scott told the rapist at the High Court in Edinburgh: “You were only interested in your sexual gratification.”
The judge said that the “opportunistic nature” of the offence involving such a vulnerable victim required a substantial custodial sentence.
She said: “You invited her into your house. When she followed you in you decided, in your words, ‘your luck was in’.”
Lady Scott, who had deferred sentence on Allan for a background report, said it was clear he had “a derogatory attitude” towards women but added he had no history of sexual offending.
The judge said it appeared that he now accepted that he must address his drinking.
Lady Scott told Allan that he would be placed on the sex offenders’ register indefinitely following his earlier conviction for the rape of the 61-year-old woman.
Allan, 43, had claimed that he had consensual sex with the woman on 19 June in 2017 at his home in Murray Street, in Ayr.
But a jury at his trial convicted him of raping the woman who was incapable of consenting to sex because of a mental disorder. During the assault he took off her clothes.
The woman did not give evidence in court due to her condition but jurors heard statements she gave to specially trained officers and a videoed interview.
She said she went for a walk about 5.15am and bumped into a man, who was on his own and carrying something. She helped him with a beer keg.
She said: “I didn’t know this man but he said he knew me and I said ‘I have dementia’ and told him I was 61. He said ‘You look 51’.”
The woman said that at his home he started talking about sex. She said: “I didn’t know what he was talking about. I told him I wanted to go home.”
She said Allan undressed her and then himself and put her on a bed. She added: “I didn’t understand what was happening.” After the assault she dressed and left but did not know where she was. She said: “I was upset and crying.”