A Good Samaritan has been left seriously injured after he offered to let a stranger stay the night because he believed he was homeless.

At 10pm on April 13, the man was walking home near Gilmore Avenue and Thomas Road in Orelia.

The man suffered injuries as a result of the random attack. Credit:WA Police

As he was walking he met a man who he believed to be homeless, and the two walked together.

The victim invited the man to stay the night, and they walked to his house.