MINNEAPOLIS — Investigators were trying to buy a high-capacity pistol from Dolal Idd with help from a confidential informant before the 23-year old was killed in an exchange of gunfire with Minneapolis police last week, according to search warrant documents released Monday.

The shootout ensued Wednesday night when police moved in to arrest the Eden Prairie man at a south Minneapolis gas station, the documents said. Idd died at the scene. Minneapolis Police Chief Medaria Arradondo released a 27-second clip from one officer's body-camera video last week and said it showed that Idd shot first before officers opened fire during an attempted felony traffic stop.

A preliminary report from the BCA on Monday also said Idd fired first.

Authorities had previously said that Idd was being sought in a weapons investigation, but the search warrant documents provided the first detailed account of why police were focused on Idd. He was prohibited from possessing guns because of a 2018 weapons offense for possessing a stolen shotgun. Hundreds of people marched near the gas station Sunday to protest the city's first police-involved death since George Floyd died after being restrained by officers in May.

Crime scene personnel from the state Bureau of Criminal Apprehension spotted a black and silver handgun between Idd's body and the center console of the car he was driving, the documents said. The documents did not say whether the gun was the same type that investigators were trying to buy. A female passenger who owned the vehicle but was not named in the documents told investigators that she was Idd's girlfriend but knew him only as "Bird," a nickname that police knew he used.

The BCA said Monday that its preliminary investigation has found that Idd struck several police vehicles with his car, "then fired his weapon at officers. The three officers returned fire, fatally striking Mr. Idd." The agency said they recovered both a handgun and a MAC-10 assault-style handgun from Idd's car.

The BCA also identified the officers involved as Paul Huynh, a six-year veteran; Jason Schmitt; a 23-year veteran; and Sgt. Darcy Klund, a 33-year veteran. The investigation is continuing.

In the search warrant application, BCA Special Agent Brandon Johnson said the informant told police that Idd had firearms at his home. The agent said that due to Idd's history of weapons and narcotics arrests he sought authorization for a nighttime raid of Idd's home, which was owned by Idd's father. He also noted that Idd's brother, who had also lived there, was recently arrested by Bloomington police in a gun homicide. The agent asserted that investigators believed they would find weapons at the residence, and they were concerned that evidence could be moved or destroyed when Idd's family learned of his death.

Hennepin County District Judge Peter Cahill, who is presiding over the cases of four ex-Minneapolis police officers charged in Floyd's death, approved the search warrant. Johnson later reported back that no firearms, ammunition or other potential evidence related to firearms was found in the early Thursday search.

Idd's father, Bayle Gelle, has complained that frightened family members were treated roughly and handcuffed with plastic ties during the search, while children were present. He has said that officers would not initially tell them the reason for the search and that Idd was dead.

The Hennepin County Sheriff's Office released body camera video of the search on Saturday. Sheriff David Hutchinson said the video showed that his deputies and other officers involved in the search acted professionally and appropriately.

Idd, a Somali American, was killed less than a mile (1.6 kilometers) from the street corner where a white Minneapolis officer pressed his knee on Floyd's neck for several minutes, even as Floyd pleaded that he couldn't breathe. The May 25 death of Floyd, who was Black, sparked days of sometimes violent protests that spread around the country and resonated worldwide.

While Idd was killed in Hennepin County, Dakota County Attorney James Backstrom said his office will review the case to determine whether the officers involved "were legally justified to use deadly force under Minnesota law, and if not, to handle any prosecution which may result." He noted that prosecutors in the five largest counties in the Minneapolis-St. Paul metro area have agreed to do so with police shootings, or to call in the state attorney general's office, to avoid any appearance of a conflict of interest.