Slideshow by photo services

THORNTON, Colo., Nov 2 (Reuters) - Police in Colorado on Thursday captured a man who they had said calmly walked into a suburban Denver Walmart and fatally shot three people before driving away.

The Thornton Police Department said on Twitter that Scott Ostrem, 47, who authorities said randomly opened fire on Wednesday, had been taken into custody but did not immediately give details.

Authorities had earlier released a surveillance camera photograph of a middle-aged white man wearing a black jacket and blue jeans. They also published a photo of the red four-door hatchback he was believed to have fled in.

Ostrem "nonchalantly" entered the store in Thornton, about 10 miles (16 km) northeast of downtown Denver, and opened fire on shoppers and employees shortly after 6 p.m. (8 p.m. EDT), Thornton Police Department spokesman Victor Avila told reporters, citing witness accounts.

Two men were killed in the shooting and a woman who was shot was taken to a hospital where she died, according to police.

"What we have determined is that it is random as of right now," Avila told reporters. "As witnesses stated, the person came in and just shot towards a group."

Avila had told Reuters that Ostrem was a "local" but said he could not give details while the investigation was under way.

The Walmart had been quickly surrounded after the gunfire by police and fire crews. Authorities initially said "multiple parties" had been injured. Avila said there was no indication the shooting was an act of terrorism as no one has claimed responsibility.

"We can't rule anything out," he said.

Walmart customer Aaron Stephens, 44, of Thornton told Reuters he was buying groceries at a self-checkout stand when he heard gunshots and ricocheting bullets.

"The employees started screaming and the customers started screaming" as people began to flee the store, he said. "I ran out, too, because I didn't want to get shot."

NBC television affiliate 9NEWS reported a woman whose son was in the Walmart said he heard about 30 gunshots.

Early accounts of multiple casualties had revived painful memories for the Denver area, where a gunman killed 12 people in 2012 at a midnight screening of the Batman movie "The Dark Knight Rises" at a theater in the suburb of Aurora. The shooter, James Holmes, is serving a dozen consecutive life sentences without the possibility of parole.

In 1999 two 12th-graders fatally shot 12 fellow students and a teacher at Columbine High School in suburban Jefferson County. The pair, Eric Harris and Dylan Klebold, then committed suicide in the campus library.