The gun used to kill journalist Lyra McKee in Derry was also used in four paramilitary-style shootings in the city, the High Court in Belfast has heard.
Prosecutors detailed its history as a man on bail accused of possessing the pistol had his police signing conditions reduced.
Ms McKee was shot dead as she observed rioting in the Creggan area of Derry in April 2019.
Dissident republican group the New IRA later claimed responsibility for the 29-year-old's killing.
Niall Sheerin, a 28-year-old bookmaker of Tyrconnell Street in Derry, denies charges of possessing a firearm in suspicious circumstances and possessing a firearm with intent to endanger life.
The Hammerli .22 pistol and eight rounds of ammunition were discovered wrapped in bin liners in a hollow behind a telegraph pole during searches in the Ballymagroarty area of the city last June.
Tests confirmed it was the same weapon used to kill Ms McKee, the court was told.
Crown lawyer Robin Steer said: "Police have also found that the firearm had been used in four paramilitary-style assaults between September 2018 and March 2019.
"Four men were shot in the legs by this firearm, and on two occasions the victim was even able to describe that it was a small black gun."
Partial DNA profiles said to match Mr Sheerin's were obtained from the pistol's loading mechanism and magazine.
"It's 70 millions times more likely the DNA found on the magazine belongs to him than somebody else," Mr Steer contended.
He argued that this indicated the accused had the gun in his physical possession.
Mr Sheerin was granted bail last July, with conditions including an obligation to report to a PSNI station on a daily basis.
Opposing his application to reduce those terms, the prosecution cited a further recent spate of paramilitary-style shootings in Derry.
"There have been four incidents since January of this year," Mr Steer said.
On 6 January, a man was driven to a wooded area in the Creggan and shot in both legs.
Two days later, a second victim was targeted in the same area, sustaining a wound above the knee.
On 6 February, another two men were subjected to similar attacks in a Creggan alleyway.
One of them had been shot in the thigh and shin, and was taken to hospital in a critical condition.
The daily signing condition is a proportionate and necessary restriction aimed at ensuring police know the accused's whereabouts, it was submitted.
Mr Sheerin is not accused of any involvement in Ms McKee's death, or any offences connected to the gun attacks.
Defence counsel Joe Brolly told the court his client "resolutely denies" charges he does face which are based on a DNA swab with no other surrounding evidence.
He pointed out that the man charged with Ms McKee's murder, 53-year-old Paul McIntyre, from Kinnego Park in Derry, only has to report to police on bail three times a week.
Mr Brolly insisted the latest series of punishment shootings referred to be the prosecution are not linked to the case against Mr Sheerin.
"It reminds me of one of those surrealist jokes: How many fish does it take to change a light bulb? Two nuns," he said.
"There's absolutely no evidence to link this accused to any of that, nor is it suggested there is, nor has he been questioned in relation to any of those matters.
"If there are organisations in the Derry city area involved in punishment shootings it's got nothing to do with this applicant."
Mr Justice Rooney ruled that the daily reporting condition is to be reduced.
Ordering Mr Sheerin to sign-in with police three times a week, the judge said: "I think it's a fair compromise."