HOUSTON – A man who fired shots Thursday after robbing a southwest Houston gas station was shot and killed by an officer after he fled, authorities said.

The robbery was reported about 8:35 a.m. at an Exxon gas station at South Post Oak Road and Willowbend Boulevard.

VIDEO: Sky 2 flies over scene of shooting

KPRC2 sources identified the man who was killed as Anthony Joe Williams.

Williams was charged with two counts of aggravated assault against a public servant and one count of aggravated assault with a deadly weapon after authorities said he approached officers while holding a machete in April 2017.

Williams was shot by Houston police officers at 14874 Estrellita Drive around 12:30 p.m. on April 27.

READ: Machete-wielding man shot by officers, facing aggravated assault charges

Houston Police Chief Art Acevedo said Williams grabbed cash and beer during the robbery. As Williams was fleeing the scene in a black Toyota Avalon, the clerk went outside and began taking pictures of the license plate, Acevedo said.

"The clerk saw him coming back, ran back into the Exxon, locked the doors behind her at which time, when he noticed the doors were locked, he fired several rounds at the clerk," Acevedo said.

VIDEO: Witness video of officer-involved shooting

Right before Williams fired, Tonya Jones said she showed up to get gas.

"He had just finished robbing them," she said.

The doors were locked, and standing next to her was Williams, who she said chased her.

"While I was trying to take off, he was pulling on my door trying to get in and then I just drove off and he started shooting again," Jones said.

Several minutes later, Acevedo said, the Avalon was involved in a crash on the 610 West Loop near Fournace Place in Bellaire. When Bellaire police officers arrived to investigate the crash, Williams jumped out of the car with a gun and ran to a nearby shopping center, Acevedo said.

Houston police officers arrived at the shopping center and began chasing Williams, Acevedo said.

Williams then tried to carjack several drivers during the chase before an officer shot him several times, Acevedo said.

"While the suspect tried to flee on foot, he continued to display his firearm and pointed it at different people, including officers. (He) refused commands," Acevedo said.

VIDEO: Chief Acevedo gives updates on officer-involved shooting

Cellphone video from a witness shows the moment Williams was crossing Pin Oak Park near the West Loop toward the parking lot at Pin Oak Centre.

"You see the guy, the person? That's him," Francois Mercado said. "He come from over there and he crossed the street, shooting him."

Williams collapsed in the parking lot and died, Acevedo said.

Acevedo said the officer was uninjured in the shooting. A driver was injured in the crash on the freeway.

Houston Community College officials confirmed that the shooting happened near the school's West Loop Campus, and said operations are continuing as normal.