A man has gone on trial in WA accused of murdering another man over a $2000 debt, while three others are accused of being accessories.

The body of a man who was shot in the head because he owed his killer $2000 was dumped in bushland where two prospectors found it an hour later, a Perth court has heard.

Codie William Davidson is on trial in the West Australian Supreme Court accused of murdering 32-year-old Ryan Penglase.

Darby Paul Thomas MacKenzie, Dwayne Peter Alan Kent and Peter Edward Tomlinson are each charged with being accessories after the fact.

In his opening address on Tuesday, prosecutor Bernard Standish said it was a “truly remarkable coincidence” that two prospectors from Queensland stumbled upon the body about an hour after it was dumped in Kalgoorlie bushland in August 2012.

Mr Standish said Davidson was agitated about a $2000 debt owed to him by Mr Penglase and regularly complained about it.

The court heard Mr Penglase tried to pay Davidson back with a stolen computer, which the accused rejected and returned to the rightful owner.

On the fateful day, Davidson armed himself with a sawn-off shotgun and fired at Mr Penglase’s head, while the others helped him dispose of the body, clean up the mess and destroy evidence, the court heard.

Mr Standish said that when Davidson was interviewed by police he said: “I didn’t even know he was murdered.”

But in a second interview, Davidson made admissions about carrying the gun in a bag, saying: “I only used it as a scare tactic.”

In Kent’s interview, he admitted to putting Mr Penglase’s body in a vehicle and driving it to bushland.

He also burned a blanket and the clothes he was wearing because he thought they would have DNA on them, Mr Standish said.

MacKenzie said in his interview that he wanted to report what happened to police but did not, and he also helped destroy a hard drive, the court heard.

Tomlinson said in his interview that he helped put the body in the vehicle and did so because he was scared, but admitted no one had threatened him, Mr Standish said.

Davidson’s lawyer, Jonathan Davies, argued his client acted in self-defence and Mr Penglase’s death was an accident.

He said his client was responsible for manslaughter, not murder.

The trial continues.