Two men have been charged with having a gun in suspicious circumstances as part of a police investigation into dissident republican activity.
The pair were arrested in Lisburn on Thursday night, after police stopped the car they were travelling in.
Mr Holmes was remanded on bail but his co-accused was refused bail.
The court was told police found the weapon in a snow-covered ditch, close to the vehicle that they had stopped.
The long-barrelled rifle, which was viable, had been wrapped in plastic bags.
The car was searched and plastic bags were found in the vehicle. They have yet to be forensically tested, the court heard.
A police constable told the judge he believed he could connect both of the accused to the charge through documentary evidence and CCTV footage, including aerial footage.
A solicitor for Mr Flannigan queried the charge against his client.
He said it was more like attempted possession than possession of a firearm and said the prosecution case was very weak.
The judge also said the case was not particularly strong at this stage but it could get stronger.
Mr Flannigan, 32, was refused bail and remanded in custody.
His 24-year-old co-defendant was remanded on bail under strict conditions.
Both are due to appear in court again later this month.