SAND SPRINGS, Oklahoma - An armed gunman threatening to take his own life held police at bay for nearly two hours Thursday near the Sand Springs Walmart.

The man dropped his weapon, was surrounded by police and taken into custody at 6:16 p.m.

The man had earlier fired his gun into the air twice, but police said they're not treating this as a criminal act, and the man didn't mean to target anyone else.

"We intend in this moment to treat this as a mental health incident and taking the subject in for emergency detention," Sand Springs Assistant Police Chief Mike Carter said.

Authorities responded near the old Gerdau Ameristeel and Walmart, located at 220 S. Oklahoma Highway 97, where a gunman was on the loose southwest of the department store, scanner traffic indicated.

The SWAT team, an arrest team and police and fire departments responded about 4:30 p.m., according to scanner traffic.

The south side of the Walmart parking lot was closed, but the store remained open, according to an employee.

Police said the incident was not connected to the store, except for its proximity.

At 5:30 p.m., a police source told News On 6 no shots had been fired. They later confirmed two shots had been fired into the air about 3:45 p.m.