LAS VEGAS — A man who police suspect killed two sleeping homeless men in Las Vegas pleaded not guilty Thursday to attempted murder in an unusual case charging him with trying to kill a mannequin that police posed as a decoy near the scene of the earlier slayings.

Shane Allen Schindler, 30, has not been charged in the Jan. 4 bludgeoning death of Daniel Aldape or the Feb. 3 killing of David Dunn, who police say were apparently sleeping when they were attacked. The county coroner determined that both men died of head injuries.

Schindler was arrested Feb. 22 after police said he was seen on surveillance video creeping up on the mannequin in a vacant downtown lot, pulling a hood over his head and using a two-handed grip to pummel the blanket-covered head of the decoy with a 4-pound (1.8-kilogram) ball-peen hammer.

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

But prosecutor Marc DiGiacomo has said Schindler could not have known he wasn’t attacking a human.

Schindler’s court-appointed attorney, Ashley Sisolak, has withdrawn a challenge of his mental competency. She declined outside court Thursday to comment about the case.

Schindler, who moved to Las Vegas from Bay City, Michigan, entered the plea in Nevada state court to attempted murder and carrying a concealed weapon, the hammer. A grand jury indicted him last week. A judge set trial for Aug. 8.

Clark County Public Defender Phil Kohn has 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 and 1989 pointed to intent when it rejected arguments of legal impossibility in attempted crimes.