Police in Baton Rouge fatally shot a black man outside a convenience store on Tuesday, July 5, 2016 in a confrontation recorded by a bystander whose video went viral.

The shooting prompted protests and a federal civil-rights investigation. A little over a week later, 3 police officers were killed and 3 others wounded in an ambush attack. 

How did the altercation begin?

ALSO: What we know about the two officers involved

Police say officers Blane Salamoni, a four-year member of the department and Howie Lake II, a three-year veteran, responded to an anonymous call from someone claiming a man selling CDs outside the Triple S Food Mart threatened him with a gun. After police arrived, some type of struggle ensued and Alton Sterling, 37, was fatally shot in the chest and back. The officers were placed on administrative leave pending an investigation.

What does video of the confrontation show?

WATCH: Witness video shows confrontation (graphic video)

Cellphone footage circulating on social media appears to capture the encounter. "Get on the ground, get on the ground!" one officer shouts at the outset of the video clip. A second officer tackles Sterling, who appears to be pinned down when an officer yells, "He's got a gun! Gun!" The other officer then draws his service weapon and fires at Sterling.

Congressman Cedric Richmond, D-LA,  said both officers were wearing body cameras, but they fell off during the struggle and do not show the shooting. He said police are analyzing dash cam video and store surveillance video, which are believed to have captured the ordeal.

Was Sterling armed?

The store’s owner, Abdul Muflahi, told WAFB-TV that Sterling did not have a gun in his hand but he saw officers remove a gun from Sterling’s pocket after the shooting.

Is carrying a gun legal in Louisiana?

Louisiana is an open-carry state, meaning people can be armed with a gun in plain sight. There are exceptions, such as for felons and people convicted of misdemeanor domestic violence.

Who was Alton Sterling?

WATCH: Grief at funeral for Alton Sterling

Sterling was a father who appeared to be well known in the neighborhood. He also had a lengthy arrest record and was a registered sex offender since being convicted on a charge of carnal knowledge of a juvenile in September 2000. Family members urged the public not to judge him on his criminal record, saying he paid his dues.

Mufleh Alatiyat, 25, who worked at the convenience store, told the Associated Press that Sterling was generous, often giving away CDs or buying food or drink for people. “He was a very nice guy,” Alatiyat said. “He helped a lot of people.”

Who conducted the investigation?

The U.S. Justice Department's Civil Rights Division led the investigation. The FBI, Louisiana State Police and local officials aided the probe, he said.

What has the reaction been to the shooting?

ALSO: 200 arrested in July 2016 protests

Residents protested on and off throughout the days after the shooting. Demonstrators chanted, "hands up, don't shoot" and "black lives matter." A day after Sterling was killed, there was another police killing of a black man in Minnesota that was captured on video. Philando Castille was shot and killed by officers while in a car.

That shooting, coupled with the shooting of Sterling, set off a series of demonstrations around the country. One in Dallas, ended with five officers killed and several others injured.

A week and two days later, Gavin Long shot and killed 3 officers in Baton Rouge and injured 3 others.