A court heard that an undercover police officer posing as a criminal was invited to a military armory.
Prosecutors allege that it was part of a plot to sell ammunition to him by two Coldstream Guards officers.
Southwark Crown Court heard that a police officer visited Kirtland Gil's home to retrieve a batch bullets.
41-year-old Mr. Gill denies conspiring to sell ammunition and possessing a prohibited weapon. Rajon Graham, 33 has previously admitted to selling ammunition.
The alleged offences occurred between December 2020-2021. Mr Gill was serving in the Coldstream Guards, which are part of the Household Division and responsible for protecting the Queen and Windsor Castle.
The court heard that Graham sold 300 9mm Parabellum bulleted ammunitions to "D" the police officer.
The bullets were wrapped with Bacofoil bags and sold to the jury for PS5,800 cash in four meetings with "D".
On 17 December 2021, the court was informed that Graham had taken "D” to Victoria Barracks near Windsor Castle. This is where the regiment, well-known for its red jackets as well as black bearskin caps, is based.
The officer, who was seated behind a screen, said that he had spoken to guards when he entered the camp.
"I was anxious about being on a military base in the way that I was portraying myself to be a criminal.
"D" stated that they parked in the parade square while waiting for Graham's friend who he claimed was being interviewed by The Sun newspaper.
The court heard that Mr Gill was interviewed by the court because he was the first black regimental sergeant major for the Household Division.
Jurors were told by the undercover officer that Graham, whom he knew as Solj, said to him that it was too risky for him to go to the base.
"D" stated that "He kept saying it was okay, I was with you and everything would be fine while I was with you."
When Duncan Atkinson, QC asked D if Graham accepted an offer to see rifles in the armoury and D replied: "No. That was a terrible idea.
"It was difficult to enter the Army base. But to go into armoury with live guns with someone I perceived as a serious criminal was not something I was willing to take."
Graham is said to then have driven "D", a car belonging to Mr Gill, to Mr Gill’s home nearby to pick up a supply of ammunition. He bought it for PS1,000.
The trial continues.
Follow BBC South on Facebook and Twitter. Send your story ideas to email@example.com.