LAS VEGAS (AP) — A store security guard who was wounded by police after allegedly firing a handgun inside a busy Las Vegas clothing store was characterized by a prosecutor on Tuesday as a frustrated former lawyer from Egypt who "just snapped" for no apparent reason and posed a danger to the community.

Mohamed Abdalla Mahmoud, 37, stood shackled, supported at the arms by jail officers and in apparent pain from his gunshot wound while Chief Deputy Clark County District Attorney Shanon Clowers called it astonishing that none of the more than 40 people in the Ross Dress For Less store was wounded in the Aug. 11 shooting.

Mahmoud only spoke during court proceedings to pronounce his name for Las Vegas Justice of the Peace Joseph Sciscento.

"This is a completely unprovoked crime by somebody with no criminal history, no history of violence or anything like that," Clowers said as she asked the judge to set bail at $500,000.

"Really, he just snapped," she said. "I think that's even scarier ... because now you don't know when that person could react again. He could have killed any of the people in that store."

Mahmoud's court-appointed attorney, Zohra Bakhtary, sought a bail that she said he and his family might be able to post: $70,000.

Police say Mahmoud unleashed 16 shots after an argument with the store manager, and Clowers said Mahmoud reloaded his handgun and fired shots at police before he was wounded outside the store.

The judge set strict rules including house arrest and a mental health evaluation if Mahmoud posts bail, and said he has to surrender his passport if he's freed from jail ahead of a Sept. 4 preliminary hearing.

Prosecutors can seek a hearing to determine the source of bail money, Sciscento said.

Mahmoud faces multiple felony attempted murder, assault and weapon charges that could get him decades in prison.

Clowers said he is a married U.S. citizen who was born in Cairo, Egypt, and lived in the rural Nevada community of Pahrump before moving to Las Vegas several weeks ago. She said his gun was legally purchased.

Mahmoud became enraged and argued with a manager about a shopping cart being left near the clothing store entrance during hectic weekend shopping with families and children buying back-to-school clothes, authorities said.

Mahmoud is accused of threatening the manager and another employee, going to his car, retrieving a handgun and two clips of ammunition, and firing the gun wildly as he chased the manager through the store.

He was outside when he fired four shots at the first officer to arrive amid panicked 911 calls about an active shooter, police said.

Mahmoud fired two shots toward Officer Bryon Bunitsky, whose body-worn camera showed him returning fire with five shots, Clowers said. Mahmoud was hit once, police said.

Bunitsky, 47, an 18-year police veteran, is on paid leave pending departmental and district attorney reviews of the shooting.