Three people were hospitalized Sunday with gunshot wounds after a 17-year-old male opened fire on a man at a Pittsburgh-area mall, police said, striking his intended target as well as two bystanders.

The Monroeville Mall went on lockdown Saturday evening after the shooting. The gunman managed to escape but police say they were able to identify him by matching surveillance video with images on social media.

The suspect, Tarod Thornhill, was arrested at a home in Brackenridge about 3:15 a.m. Sunday. 

Thornhill is charged as an adult with aggravated assault, attempted homicide, and recklessly endangering other people, the Allegheny County Police Department said in a press release Sunday morning. 

Thornhill will be held at Allegheny County Jail to await arraignment.  

Police were able to positively identify Thornhill using images from social media and store video surveillance, the release said. 

Gunfire erupted inside the Macy's department store at about 7:30 p.m., sending panicked shoppers running. Police went store to store to evacuate the mall, which closed for the night.

Police Chief Douglas Cole said two men and a woman were shot, including the man who was targeted. He said the two men were in critical condition, while the woman was in stable condition.

"This was not random," Cole told reporters. "We have evidence that leads to that." He declined to elaborate.

In late December, hundreds of teenagers gathered at the mall and several fights broke out. The fights caused local officials and mall administration to agree on a plan to increase security there.

Pennsylvania native and ex-NFL quarterback Terrelle Pryor tweeted Saturday that he was at the mall, a short drive east of Pittsburgh, when the shooting occurred.

"Damn was just in monroeville mall and just saw 2 ppl get shot," he tweeted. "They are letting guns go in there."

Shoppers described chaos as shots rang out.

"All of the sudden we heard people screaming," Athena Coffey of Churchill told KDKA-TV, "and the next thing you see is a bunch of people, teenagers, scared to death, just exodus en masse in a way you could not believe. I grabbed my children, husband, we started screaming `go, go, go!"'

Yvette Jackson of North Braddock was attending a birthday party at Giggles and Smiles, a fitness and fun center for children.

"We saw a lot of running, a lot of chaos," she told the Pittsburgh-Tribune Review. She said she and other patrons were locked in the store for about 45 minutes until police came and let them out.

Four on-duty police officers have been stationed in the mall on Friday and Saturday evenings at the mall's request, Monroeville Mayor Gregory Erosenko said.

"I would have thought that having four officers there would have deterred any incident like we saw (Saturday)," he told the newspaper.

Weapons are banned at the mall, whose code of conduct specifically prohibits "Carrying or displaying weapons of any kind except those carried by certified law enforcement officers in the performance of their duties."

The mall, which is owned and managed by CBL & Associates Properties Inc., of Chattanooga, Tennessee, has 1.1 million square feet of shopping space. It says on its website it features more than 125 stores and eateries, anchored by JCPenney, Macy's and Barnes & Noble.

No one answered the phone at CBL offices after business hours Saturday. A mall security officer reached by telephone said he couldn't talk.

The Associated Press contributed to this report.