When an intoxicated mob invaded his apartment, Joshua Lindsay Elkerton-Sandy grabbed the first thing he could find, a court has heard.
It happened to be a knife.
Less than a minute later, the gate crashers fled the apartment after three members had been stabbed including 18-year-old Kane Alexanderson, who died six days later.
Elkerton-Sandy told police he was acting in self-defence, the court heard.
He was charged with manslaughter.
Members of the group had a "beef" with Elkerton-Sandy and planned an attack for days, defence barrister Stephen Kissick told a Brisbane Supreme Court jury on Tuesday.
First they tried to coax Elkerton-Sandy out of an apartment that had been booked to watch Australia Day 2020 fireworks with friends, Mr Kissick said.
Then the nine-strong group snatched a security card to access the Brisbane CBD high-rise apartment, the court was told.
Seven members were able to barge their way in with Mr Alexanderson leading the charge, the court heard.
Some were armed with beer bottles after drinking at a nearby apartment building.
Mr Kissick said Elkerton-Sandy had three choices when the mob burst in - flee, take the beating or defend himself.
"He chose to stand up to this gang who were obviously going to cause as much harm as they could," he said.
"There was no stop and talk, they just rushed him ... to flog him."
Elkerton-Sandy picked up the first thing he could see which was the knife, Mr Kissick said.
"If seven people ran into your house unexpectedly, what would you do?" he asked the jury.
"This wasn't just a bunch of mates popping over ... it was a run-in gang bashing.
"He was being assaulted the second those men as a pack came through that door.
"This was a fluid motion of violence. He was the target. He was obviously entitled to defend himself."
Elkerton-Sandy told police that he had a falling out with group members because he no longer wanted anything to do with their lifestyle, the court heard.
"They were no longer friends, (they) might have been frenemies," Mr Kissick said.
Elkerton-Sandy told police that once the group burst into the 17th floor apartment, they punched and kicked him, smashing bottles over his head.
He claimed he was pinned against the balcony and "half hanging over" before his girlfriend grabbed him, the court heard.
"Why am I getting in trouble ... I am the victim," he told police.
Crown prosecutor David Nardone said Elkerton-Sandy gave different versions to police before telling an undercover officer in a watch-house cell that he stabbed three group members.
One was slashed in the face, another in the torso and arm while Mr Alexanderson was stabbed twice, including a 6cm deep wound that penetrated his heart.
Mr Nardone said Elkerton-Sandy's primary concern just 15 minutes after the attack was the return of his gold chain which was lost in the incident.
"The absence of expression of concern (for Mr Alexanderson) is consistent with a person who chose to engage in a fight ... because he was armed with a knife and I would suggest to you ready to use it," he said.
The jury must ponder whether Elkerton-Sandy lawfully acted in self-defence when he caused Mr Alexanderson's death, Mr Nardone said.
Elkerton-Sandy, 21, has pleaded not guilty to manslaughter.
The trial before Justice Sean Cooper continues.