Officers in Baton Rouge observed the butt of a gun in Alton Sterling’s front pants pocket while they were trying to restrain him, then saw him reach for the weapon before they opened fire, according to an affidavit that a Baton Rouge detective filed for a search warrant in the case.

The details, while spare, provide the first account of what police said preceded the fatal encounter outside a convenience store last week that set up a public outcry anew over fatal police shootings of black men. Two videos circulated of the death have shown officers with Sterling pinned to the ground when they begin firing. Authorities have refused to discuss what occurred, citing an ongoing investigation, which is being led by the Department of Justice.

Both officers involved in the shooting had been interviewed by Baton Rouge police investigators, and “the officers feel they were completely justified,” East Baton Rouge Parish District Attorney Hillar Moore said during a news conference last week. On Monday, Moore recused himself from the investigation, citing his relationship with the parents of one of the officers involved in the shooting.

The affidavit indicates that homicide investigators sought the search warrant and retrieved surveillance video from the Triple S Mart a few hours after Sterling was pronounced dead. Police had responded to a complaint of a black male standing outside the store who had threatened someone with a gun. Sterling, who was selling CDs in the early morning hours of July 5, fit the description of the person with the gun, the affidavit states.

The affidavit sheds no light on what verbal conversation the officers, who the police chief identified last week as Blane Salamoni and Howie Lake, had with Sterling. It states the officers “contacted the subject and gave him direct orders to place his hands on the hood of a nearby vehicle.”

When Sterling did not comply, the officers tried to physically restrain him and then “deployed” their Tasers, the affidavit states.

“While the officers were attempting to subdue the subject the officers observed the butt of a gun,” the affidavit states, and, when they saw him attempt to reach for the gun, one officer fired. Police have not said which of the two officers fired.

They have been placed on administrative leave pending the outcome of the investigation.

An attorney representing Sterling’s 15-year-old son and his son’s mother challenged the police account laid out in the affidavit, particularly that officers saw the butt of the handgun, the Advocate reported.

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

He added: “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.”

Second video shows police shooting Sterling

The owner of Triple S Mart, Abdullah Muflahi, filed a lawsuit on Monday against Baton Rouge police, the Associated Press reported.

The suit alleges Muflahi was illegally detained after he recorded the incident between Sterling and officers on his cellphone, and that he was kept in a police car for four hours and then detained at Louisiana Police Headquarters for two hours, AP reported.

Sterling’s public funeral is scheduled for Friday at Southern University.

[This story, originally published July 11, has been updated.]