THORNTON, Colo. — An anonymous tip helped lead police to the suspect accused of fatally shooting three people inside a Walmart in Colorado on Wednesday.

Scott Ostrem, 47, is accused of walking into the Walmart in Thornton, Colo., "nonchalantly" and opening fire with a handgun on a group of people near the cash registers, said a spokesperson with the Thornton Police Department.

Thornton (Colo.) Police Department released this photo of the suspect in the Walmart shooting in Thornton, Colo., on Wednesday, Nov. 1, 2017.

Ostrem was arrested Thursday morning during what police say was a "high-risk" traffic stop. A SWAT team used a flash bang as a distraction before making the arrest, Officer Victor Avila said during a news conference morning.

More: Police: Shooting at Colo. Walmart leaves 3 people dead

Before the arrest, officers executed a search warrant of Ostrem’s home, but he wasn't there.  

Avila described the aftermath of the shooting as “mass chaos," as hundreds of people ran out of the store.  

"If and when the surveillance is available, you'll see that there were people running everywhere," Avila said. "That's truly what took the longest amount of time. Just to be able to decipher what exactly we had." 

Once officers were able to get inside, they sifted through surveillance video to get a name and description of the suspect. 

Ostrem has recent addresses in Denver and the north Denver area in recent years. He filed for bankruptcy in 2015, was charged with resisting arrest in 1999 and was sued by a family member in 2011. He was charged with driving under the influence in 2013.

There is no known motive for the shooting.

Police guard the front entrance to Walmart where a shooting occurred inside the store, Wednesday, Nov. 1, 2017, in Thornton, Colo.

The shooting appeared random and there were no indications that it was an act of terror, Avila said Wednesday night.

"This is a very heinous act," said Avila. "We don't know exactly what the motive of the person was, but it was certainly a terrible act."

Authorities received a call at 6:10 p.m. Mountain time Wednesday about a shooting inside the Walmart in the community about 10 miles north of Denver, police said.

Thornton police said two men were killed at the store and a woman was taken to a nearby hospital where she later died.

The names of the victims have not been released, though Tiffany Wilson, director of communications for Walmart, did confirm that all Walmart staff was accounted for.

The five-hour delay to say the suspect in the shooting was armed and dangerous — and still on the run — was reportedly because investigators were working to gather information on who that person was, according to Thornton Police. 

Contributing: Jacob Rodriguez, Jane Mo and Erin Powell, KUSA-TV, Denver; The Associated Press. Follow Caitlin Kingsbury and Bobbi Sheldon on Twitter: @Caits_take and @Bobbi_9NEWS