(KRON) — A man accused of shooting a woman on Stanford’s campus Tuesday morning was arrested at a Trader Joe’s later that day, multiple police agencies said. The man was armed when he entered the grocery store, and he said he planned to rob it.

A woman was injured in a shooting around 2 a.m. near Stanford’s Eucalyptus groves, the police said.

The shooting happened on the 500 block of Arboretum Drive, wounding a 47-year-old woman. The victim was hospitalized with a non-life-threatening injury to her leg, the Santa Clara County Sheriff’s Office said.

At 7:27 p.m., a citizen told the Palo Alto Police Department that he saw a man holding a gun behind his back near the intersection of El Camino Real and Embarcadero Road. Eight minutes later, police got a call from a Trader Joe’s employee.

“An employee of Trader Joe’s at 855 El Camino Real called police to report a man had just entered grocery store, said he had a gun, and told him to call the police,” PAPD said in a press release.

Officers arrived at the store at 7:37 p.m. and learned that the suspect was in the employee break room. He was arrested without resistance three minutes later, per police.

The man, identified as 43-year-old Robert Daniels, had a loaded, unregistered “ghost gun” on his waistband. Nobody was hurt at Trader Joe’s.

Daniels was turned over to the sheriff’s office after his arrest. Police are seeking charges of attempted murder, attempted robbery and firearm violations.