HOUSTON (AP) — A man with a hunting knife has been arrested in the stabbing of an off-duty Houston Community College police officer as she worked security at a Wal-Mart.

Houston police say the attack happened early Tuesday. The officer was hospitalized in critical condition.

Police spokesman Kese (KEES) Smith says investigators are trying to determine a motive and whether the suspect and the victim know each other.

Smith says the officer, whose name wasn't immediately released, was monitoring cash registers when she was stabbed. The suspect allegedly tried to grab her gun. Bystanders helped detain the man until police arrived.

The suspect's name and details on charges weren't immediately available.