PALO ALTO (KRON/BCN) — Police arrested an armed man accused of resisting arrest during a confrontation with police outside a senior living facility.

Investigators say the incident began Monday night at Stanford Shopping Center, where a security guard told police he was following a man seen earlier at a Starbucks throwing items inside the coffee shop. Security also said the man may have stolen various items from other businesses at the shopping center.

Police say a short time later, officers saw the suspect enter a nearby senior living facility located at 620 Sand Hill Road. As officers were preparing to enter the facility to search for the suspect, he walked back outside, investigators said.

Officers gave him commands to stop, but the suspect refused, began running around the property, and then pulled out a pocketknife with an exposed 1.5-inch blade, according to police.

Investigators say officers surrounded the man, who then began yelling at the officers. They ordered him to drop the knife, but officers say the suspect refused and dared officers multiple times to shoot and kill him, according to police.

During the standoff, an officer managed to tackle the suspect from behind and disarm him. Several officers struggled with the suspect until they were able to put him in handcuffs, investigators said.

Police have identified the man as 47-year-old Martin Shelley of San Jose. They say he suffered a minor injury to the left side of his forehead which likely happened when he landed on the ground as officers tackled him.

Paramedics transported Shelley to a hospital, where he was evaluated and cleared to be put in jail. No officers were injured during the confrontation.

Investigators say they found Shelley in possession of a number of items that appeared to be from various stores at the shopping center.

Shelley was booked on suspicion of brandishing a weapon and resisting arrest. Investigators say the suspect also faces a felony probation violation because he’s on active probation in Santa Clara County stemming from a prior felony conviction of driving under the influence.

“Our officers were confronted with an armed, belligerent suspect,” Palo Alto police Lt. Zach Perron said. “They exercised tremendous restraint under very challenging circumstances.”