A court heard that two serving soldiers sold hundreds upon hundreds of rounds of ammunition to a police officer pretending to be a criminal in exchange for cash.
Coldstream Guard Kirtland Gil, 41, denies conspiring to sell or transfer ammunition, and is in possession of a prohibited firearm.
Rajon Graham, 33 years old, pleaded guilty previously to selling ammunition.
Southwark Crown Court heard that they had access the bullets issued for practice firing.
Between December 2020 and January 2021, Mr Gill was serving in the Coldstream Guards of the Household Division responsible for protecting the Queen and Buckingham Palace and Windsor Castle.
Duncan Atkinson, QC opened the case for prosecution. He said that the defendant was located at Windsor's Victoria Barracks and was responsible for managing ammunition issued for firing practice.
Graham sold 300 9mm Parabellum bulleted ammunitions. He called them "sweets" and wrapped them in Bacofoil bags. The buyer was an undercover officer referred to by "D" and paid PS5,800 cash.
Graham met "D" the undercover officer, but he made it clear to "D", that he was acting in concert with others, said the prosecutor.
Jurors were informed that police located Bacofoil bags at Mr Gill's Windsor address on Cavalry Crescent. They also found a Turkish 9mm multipurpose, self-loading pistol.
The court heard that cash was also found in his home. It contained banknotes with the same serial numbers handed to Graham by "D", which were used for the purchase of 100 rounds of ammunition.
The jury was also told that Mr Gill was linked to the plot by police surveillance and mobile phone location data.
The trial is continuing and should last for three more weeks.
Follow BBC South on Facebook and Twitter. Send your story ideas to email@example.com.