LAS VEGAS -- A hunt for the killer of two sleeping homeless men in Las Vegas led to an unusual attempted murder charge Tuesday and a legal debate about criminal intent, when a man was accused of trying to kill a mannequin used as a decoy near the downtown site where the men had died of head injuries.

The charge was lodged against 30-year-old Shane Allen Schindler at a hearing in which a justice of the peace ordered him to undergo a mental competency evaluation.

Clark County Public Defender Phil Kohn derided the charge of attempted murder as "a legal impossibility," saying someone can't kill an inanimate object.

But Nevada appellate law appears to support the charge. The state Supreme Court in 1976 rejected an argument asserting that "since it is legally impossible to commit the crime, it must also be legally impossible to attempt the crime."

"We decline to concern ourselves with the niceties of distinction between physical and legal impossibility," the court said at the time. It issued a similar ruling in 1989.

Laws in most states take into account what a defendant is thinking at the time of a crime, said Deborah Denno, a Fordham University law professor who authored a recent article about defendants and criminal intent.

"You can't murder a mannequin," Denno agreed. "But if the facts were as he believed them to be, he would have been bashing the head of a human being."

In court, Chief Deputy District Attorney Marc DiGiacomo told the judge that Schindler was "a severe danger to the community" and authorities think he may have been responsible for the two homeless homicides, although he hasn't been charged in either case.

Schindler told police following his arrest that he knew it was a mannequin he was attacking.

But DiGiacomo said Schindler could not have known that he wasn't attacking a human when he wielded a 4-pound ball-peen hammer to repeatedly strike the blanket-covered head of a dummy on Feb. 22 in a vacant downtown lot.

Police said Schindler was seen on surveillance video creeping up on the mannequin, pulling a hood over his head, taking the hammer from a plastic bag, and using a two-handed grip to pummel the decoy.

His court-appointed public defender, Ashley Sisolak, declined to comment about the case. She said Schindler intends to plead not guilty.

Bail was kept at $50,000 -- the initial amount set after Schindler was charged last week with felony carrying a concealed weapon -- the hammer.

Officials said the competency exam will give investigators several weeks to trace Schindler's activities in Bay City, Michigan, where he lived before moving to Las Vegas last year.

Police told the media last month they believed the two homeless killings were connected.

Daniel M. Aldape, 46, was found dead Jan. 4. David H. Dunn, 60, was discovered Feb. 3. Neither one had been robbed.

Homeless people were warned about the crimes, and Capt. Andrew Walsh, the downtown district patrol commander, came up with the plan to place the decoy.

"We had a sense of urgency," Walsh said. "We didn't want these cases to fall by the wayside because they were homeless. We had to think of something that's not traditional."