This article has been updated.

An ax-wielding man, identified by police as 29-year-old Vincente David Montano, attacked a movie patron at a theater outside of Nashville Wednesday and sprayed others with pepper spray before he was shot dead by police, authorities said.

Movie theater active shooter suspect identified as Vincente David Montano, age 29 pic.twitter.com/jn6iRpL9Pa — Metro Nashville PD (@MNPDNashville) August 6, 2015

The suspected firearm turned out to be an “airsoft” pistol that resembled a handgun, police said.

Montano was shot dead by a SWAT team as he exited through the theater’s rear door.

Montano appears to have had a history of mental illness, Nashville police spokesman Don Aaron said at a Wednesday evening press conference. He was committed twice each in 2004 and 2007.

“It appears this individual has had significant psychiatric or psychological issues,” Aaron said, adding, “The motive for all of this has not been determined.”

“The only person shot was the suspect as he emerged out of the rear door,” Aaron noted earlier Wednesday. There were eight people, including the suspect, inside the theater at the time of the attack.

Earlier Wednesday, police said the suspect was believed to be 51 years old, but the information turned out to be incorrect.

Police said the suspect was carrying a “hoax device” in a backpack that was designed to look like an explosive.

This is the gun the movie theater suspect had. Although it looks like a real firearm, it is an airsoft pistol. pic.twitter.com/mixi9LGc9Y — Metro Nashville PD (@MNPDNashville) August 6, 2015

“I would ask anyone to pray for his family, because obviously he has some mental problems or something else,” Steven told reporters.

A 53-year-old woman and a 17-year-old woman were also treated for pepper spray exposure, officials said. Steven said his daughter was one of the three people pepper sprayed.

“I’m very, very grateful that no one else got injured here today other than the person who perpetrated this,” Steven said, and thanked police for their swift response.

Two police officers were responding to a traffic accident near the theater when people came running up to them saying there was trouble in the theater, Anderson said. They entered the theater and one of the officers encountered the suspect, who allegedly pointed what looked like a gun at the officer, and the officer fired and backed away. “He saw a gun come up, he saw a trigger about to be pulled,” Anderson said.

When SWAT members arrived and entered the theater the suspect went to the back door, and SWAT members outside opened fire after the suspect made a threatening gesture, Anderson added.

This is the ax carried by today’s movie theater suspect pic.twitter.com/2rHVb8WnyM — Metro Nashville PD (@MNPDNashville) August 5, 2015

The bomb squad found a device apparently intended to resemble an explosive device inside that backpack, but it was not explosive, Anderson said. The device was destroyed by the bomb squad. A second backpack left at the rear of the theater contained nothing suspicious, he said. The federal Bureau of Alcohol, Tobacco, Firearms and Explosives arrived on the scene to assist.

The red dye of the pepper spray caused some witnesses to mistake the spray for blood, Anderson said. Nashville Fire spokesman Brian Haas was grateful there were not more serious injuries, noting, “this could have been a lot worse.”

The violence at the Carmike Hickory 8 theater comes nearly two weeks after a deadly rampage at a movie theater in Lafayette, Louisiana, when gunman John Russell Houser, 59, stood up and began shooting during a showing “Trainwreck” on July 23, killing two people and wounding nine others before killing himself.

Additional reporting by PHIL HELSEL, JOY Y. WANG and BENJAMIN LANDY

Read more at NBCNews.com