A man convicted of raping a vulnerable and frail elderly woman after breaking into her Perth home has been sentenced to more than 17 years in prison.

Mugahed Adam Eldouma, 40, got into the 76-year-old victim’s Armadale house in June 2018 through a window and sexually assaulted her before being apprehended and claiming to police that he was the woman’s carer.

In the District Court of WA on Thursday, Eldouma was jailed for 17 years and six months for the daytime attack which Judge Bruce Goetze described as “appalling”.

“The state of the house probably indicates that she was unable to really look after herself in the home,” the judge said.

“And this really shows then her defencelessness which makes your sexual offending all the more appalling.”

The victim has since died.

She managed to call triple-zero and provide her address when Eldouma refused to leave but he still persisted with the attack, punching her in the head and body before repeatedly sexually assaulting her.

When police arrived and arrested him in the backyard, Eldouma told multiple lies including that he had a close relationship with the victim and was like a son to her.

He did not admit to committing the attack until the eve of his sentencing.

Judge Goetze noted Eldouma had experienced trauma during his upbringing in Sudan and had a long history of substance abuse.

But he said the offending would have had a significant impact on the victim.

“With her age, she was vulnerable and unable to defend herself given her physical ailments,” Judge Goetze said.

“She was alone, she was in her home where she ought to feel safe from any interference.”