Police officers spotted the butt of a handgun in Alton Sterling’s front pocket and saw him reach for the weapon before opening fire, according to a Baton Rouge Police Department search warrant filed Monday that offers the first police account of the events leading up to Sterling’s fatal shooting.

Two officers, since identified as Blane Salamoni and Howie Lake II, arrived at the Triple S Food Mart on North Foster Drive about 12:30 a.m. July 5 after a 911 caller said a person matching Sterling’s description “threatened someone with a gun standing outside” the convenience store, according to the affidavit submitted as part of a search warrant for the surveillance video equipment from the store.

Sterling, 37, refused orders from the two officers to place his hands on the hood of a car as they approached him outside the store, where Sterling regularly sold CDs and DVDs, according to the warrant.

The officers used stun guns on Sterling and “were attempting to subdue the subject” when they “observed the butt of a gun in (Sterling)’s front pants pocket,” the affidavit says.

When Sterling “attempted to reach for the gun from his pocket, the officers fired their police-issued duty weapon at the subject to stop the threat,” the affidavit says. “The subject was shot multiple times and did not survive his injuries.”

A source with knowledge of the investigation told The Advocate last week that Salamoni fired the fatal shots. Police have said only one officer fired his weapon.

The federal Justice Department and the FBI have taken over the investigation into Sterling’s death, which was captured on two publicly released cellphone videos. The shooting has sparked protests in Baton Rouge and inspired — along with the fatal shooting of another black man by officers in Minnesota on Wednesday — demonstrations across the country.

Abdullah Muflahi, the owner of the Triple S Food Mart who said he witnessed the shooting, told The Advocate hours later that Sterling had a weapon but didn’t reach for it during the struggle in the parking lot. Muflahi publicly released on Wednesday a cellphone video he took, which captures the struggle and shooting but does not show officers’ initial interactions with Sterling.

Another cellphone video, filmed by a witness in a car in the parking lot and released the day of the shooting, shows the two officers ordering Sterling to “get on the ground,” then tackling him and pressing him on the concrete. One officer yells, “He’s got a gun!”

The video appears to show both officers drawing their handguns and one aiming his pistol at Sterling’s chest. As shots ring out, the unidentified witness filming the incident turns the camera away from the scene.

Muflahi told The Advocate that after the shooting, one of the policemen reached into Sterling’s pocket and removed a gun. The cellphone video he captured shows an officer removing an object from Sterling’s front right pocket after the shooting but doesn’t clearly show what the object is. Police have declined to say whether a weapon was recovered from the scene of the shooting, though Baton Rouge Police Chief Carl Dabadie Jr. referred to Sterling as “armed” at a news conference Wednesday.

A police dispatcher recorded on Baton Rouge police radio traffic obtained by The Advocate asked for officers to check on a man “selling CDs on the corner” outside the store, saying he had a “gun in his pocket.”

“He pulled the gun on the complainant and told him he couldn’t be around there,” the dispatcher said.

Muflahi and several relatives said Sterling, who because of previous felony convictions would have been legally prohibited from owning a weapon, acquired the gun weeks before the shooting after several robberies in the neighborhood around the store where he’d sold CDs to earn a living for several years.

Justin Bamberg, an attorney representing Sterling’s 15-year-old son and the boy’s mother, said he disputes the police account of the shooting described in the affidavit, especially the claim that the officers could see the handgun poking out of Sterling’s pocket.

“The video speaks for itself — it is extremely evident that the object that was in Mr. Sterling’s pants was deep in his pocket,” Bamberg said. “They had to reach far into his pockets to recover it.”

Bamberg also said the video of the shooting released so far shows Salamoni and Lake unnecessarily escalating the interaction with Sterling.

“Nothing changes what we clearly see on the video released — that Mr. Sterling was standing with his arms raised when he gets tased and tackled,” Bamberg said.

State Rep. Edmond Jordan, who’s representing Sandra Sterling, Alton Sterling’s aunt, said the account in the affidavit “seems to be inconsistent with the videos that I saw,” saying Alton Sterling appeared to be complying with officers before being tackled and had his hands pinned down by the officers — and therefore unable to reach for a weapon — before he was shot.

The Baton Rouge officer who filed the affidavit for the search warrant, Detective Robert Cook, does not specify where the information to compile the narrative came from. A Baton Rouge Police Department spokesman declined Monday to comment on the affidavit and warrant, citing the ongoing federal investigation into Alton Sterling’s shooting, as did the leader of the police union.

Commissioner Quintillis Lawrence signed the search warrant, according to the return that shows police seized video surveillance equipment from the store. The warrant was signed at 5:23 a.m. the day Sterling was shot, with the search executed 30 minutes later, the paperwork states.

The warrant was filed Monday with the East Baton Rouge Parish clerk of court. It is common for law enforcement to file search warrants with the court days or weeks after obtaining the warrant and executing a search.

Muflahi’s attorney, Joel Porter, filed a lawsuit Monday alleging that police illegally detained Muflahi for questioning and seized surveillance video from the store — which also captured the incident but hasn’t been publicly released — without providing Muflahi a copy of the warrant.

Bamberg, the attorney for Sterling’s son, on Monday repeated a call from the family for authorities to publicly release the surveillance footage from the store.

Follow Bryn Stole on Twitter, @BrynStole.