A Melbourne man was only trying to help a girl in distress when he hid a sawn-off shotgun used in a fatal shooting, his lawyer says.
But a friend of the man told police he was "thinking with his d***" when he took possession of the gun.
Sam Nesci, 44, was buying cigarettes from a petrol station when he made the "silly" decision to involve himself in the aftermath of a shooting.
Kara Doyle, 24, lay mortally wounded and bleeding on the footpath as two men, her shooter Mehmet Torun and Baki Unlu, frantically sought help.
The Victorian Supreme Court heard Nesci began speaking to a distressed woman, Kirsten Smith, who had been in a nearby house with the two men when Ms Doyle was shot.
Defence barrister John Willis told the court Nesci invited Smith back to his Avondale Heights bakery for a drink and something to eat.
But once there, Smith told Nesci she had the sawn-off shotgun used to shoot Ms Doyle in her car.
Handling the gun with a plastic bag to avoid leaving fingerprints, Nesci hid it in his home above the bakery.
He pleaded guilty to possessing an unregistered firearm on Tuesday.
Mr Willis told the court Nesci was a decent man who was trying to help a distressed 22-year-old girl.
"There was nothing in it for him, except he felt sorry for someone," he said.
"He's a good man who's done something silly."
But Seona Geddes, a friend of Nesci, told police Nesci was hoping to strike up a romance with Smith.
"I think he was thinking with his d***," Ms Geddes said in a police statement tendered to Nesci's committal hearing last October.
"He is going through a divorce and doesn't have a girlfriend."
Nesci kept the gun for about an hour, before Unlu, Smith's boyfriend at the time, collected it.
Nesci will be sentenced on March 6.
Ms Doyle died on April 23, 2013.
Torun, 25, of Avondale Heights, has pleaded guilty to her manslaughter.
Smith, of Fitzroy, and Unlu, 20, of Lalor, were sentenced to a 12-month good behaviour bond without conviction and a two-year community correction order respectively after both pleaded guilty to assisting an offender and perjury.