A homeless man allegedly killed a Perth man who offered him and his dog a place to sleep, a trial has heard.
Phillip John Smith, 30, is on trial in the WA Supreme Court accused of murdering Damian Andrew Noakes, 31, whose body was found inside a burnt-out Mosman Park unit in June 2012.
The court heard on Monday that Smith and Mr Noakes had met in Fremantle at the St Patrick's Community Support Centre - an outreach facility for homeless people - a day before Mr Noakes' death.
In his opening address, prosecutor Adam Hills-Wright said Mr Noakes died from multiple injuries, including five stab wounds to the right side of his neck, and also suffered a fractured nose and jaw.
He told the trial Smith doused the unit and a doona he had used to cover the body in petrol before turning on the gas and lighting a match as he fled.
Smith, who has pleaded guilty to arson, admits he killed Mr Noakes but has no recollection of the incident and denies it was murder.
The trial continues.