When a man jumped out wielding nunchucks, Stafford Anthony Emmerson panicked and fatally shot a Queensland mother in a robbery gone wrong, a court has heard.
Megan Kirley, 40, died from wounds to her head and neck from a single bullet that splintered after it was fired into her shipping container home at a rural property south of Brisbane three years ago.
Emmerson, 43, was among a group of people who arrived in the early hours of February 9, 2019 in two cars aiming to rob the Karawatha residence, crown prosecutor Dejana Kovac said.
The group found the container home's only door was slightly open when they got out of their vehicles.
Ms Kirley was in bed at home in darkness with her partner Pieter Pickering.
He grabbed wooden nunchucks after hearing cars arrive and people walking around.
"He heard someone say 'look at that'. At that point he saw a hand pointing at the door ... then fingers coming in to open the door," Ms Kovac told the Supreme Court.
"As the door opened ... Mr Pickering swung his nunchucks toward the door.
"He then heard a loud bang and within an instant he felt a ... hot wind brush against the right side of his head."
The group fled with Mr Pickering in pursuit.
He returned to find Ms Kirley crumpled over the side of the bed.
Mr Pickering began performing CPR but Ms Kirley was pronounced dead soon after paramedics arrived.
Mr Pickering told police he did not see who fired the gun.
But Ms Kovac said police identified Emmerson from CCTV footage of the two cars and interviewed him in March 2019.
Emmerson told police he was at the property with others for a break-in and had fired the weapon after earlier robbing two other residences because they needed money for drugs, she said.
Emmerson told police he was given a bag containing a gun when they arrived at Ms Kirley's property and pointed the weapon at the shipping container home's door, the court heard.
"When Mr Pickering, to use the defendant's own words, jumped out he says he was scared and fired the gun," Ms Kovac said.
"He was there to do a robbery ... what happened to Ms Kirley was not a genuine accident."
Defence barrister Timothy Ryan said there was no dispute that Emmerson was holding a gun when it fired at Ms Kirley's home.
"That is not enough to make him guilty of the offence of murder," he told the jury.
"A real issue that will loom large in this case ... is whether the prosecution prove beyond reasonable doubt that Ms Kirby's death was not an accident.
"Regardless of whatever other criminal offence the defendant might be guilty of, he is not guilty of murder."
Emmerson has pleaded not guilty to murder.
The trial before Justice Frances Williams continues.
Sign up for our newsletter to stay up to date.