Maricopa County Sheriff's Office, Associated Press
This Sept. 25, 2014 booking photo provided by the Maricopa County, Ariz., Sheriff's Office shows Christopher Scott Gale. Phoenix police said Gale, 27, was arrested Sunday, Sept. 21, 2014 in a drugstore where a female shopper was stabbed in the neck by a person who approached her from behind. According to police, Gale later said he had bought an eight-inch kitchen knife to "stab and kill" someone. Gale had been ruled incompetent to stand trial in an earlier criminal case.

PHOENIX — A man has been arrested in the stabbing of a stranger after a court commissioner ruled in a previous case that he was incompetent to stand trial, a document released Friday shows.

Christopher Scott Gale, 27, was taken into custody Sunday in a Phoenix drug store where a female shopper was wounded in the neck after being approached from behind, police said in the document.

Gale later told investigators he had bought an eight-inch kitchen knife at a different store about an hour earlier to stab and kill someone, police said.

The victim turned to face her attacker after she was stabbed. She told police the man said he was killing her to save the world.

The victim then pushed away the attacker, and he was disarmed by an off-duty federal agent who ran over from the checkout line while hearing the victim scream, police said.

The victim suffered a puncture wound that required multiple staples to close, police said.

Gale, who police said is a transient, made an initial appearance Friday in Maricopa County Superior Court. A commissioner set bail at $1 million and ordered that an attorney be appointed to represent Gale.

Gale later remained jailed on suspicion of attempted first-degree murder and aggravated assault.

In May, charges were dismissed against Gale in a 2013 case by a commissioner who ordered Gale to undergo psychiatric treatment.

Online court records did not describe the alleged crimes, and Gale's lawyer in that case, Roger Margolis, did not immediately return a call for comment.

The commissioner who ordered treatment for Gale also said in a May 29 order that Gale was a danger to himself and others and was unable to understand the nature of the proceedings or assist in his defense.