Three men accused of having a gun when their associate was shot dead by police on the M62 had the weapon because of a "possible feud", a court heard.
Mohsin Amin, Rexhino Arapaj, and David Butlin were travelling in convoy with Yassar Yaqub in January 2017 when armed police shot Mr Yaqub near Huddersfield.
The men, in two cars, were surrounded by police at junction 24 on 2 January.
All deny conspiracy to possess firearms and ammunition with intent to endanger life, Leeds Crown Court heard.
Mr Yaqub, whose death is the subject of an investigation by the IOPC, was a front seat passenger in a white Audi A4, being driven by Mr Amin, 32.
The group was being watched by undercover police.
Prosecutor Peter Moulson QC said Mr Yaqub had been earlier seen holding a black leather "man bag" as he went into a cafe in Bradford.
He added that when he left, Mr Yaqub still had the bag and also was wearing gloves.
Both the Audi and a VW Scirocco, driven by Mr Butlin, 39, with Mr Arapaj, 28, as passenger, left Bradford and were travelling back towards Huddersfield when they were stopped by police.
During the stop Mr Yaqub was shot and killed and a search of the Audi found a Russian Baikal pistol - fully operational and loaded - under the front passenger seat, together with a silencer and a bag of ammunition in the glove compartment.
Police also found mobile phones, some of which were encrypted, in the cars, the trial heard.
Mr Moulson said police downloaded a series of messages between Mr Amin and an unidentified man, referred to as Raa, leading up to the incident.
He said: "We say that these three defendants were knowing parties to an agreed conspiracy with Yassar Yaqub and/or other persons to possess firearms and ammunition."
He added: "The messages on Mohsin Amin's phone indicate there could have been possibly a feud and weapons may be used."
Amin, of Dewsbury, Arapaj, of Huddersfield, and Butlin of Holmfirth, deny conspiracy to possess firearms and ammunition with intent to endanger life.
Butlin, who was alleged to have a "push dagger", also denies having an offensive weapon.
The trial continues.