A lifer hid a metal bar from a prison exercise machine in his pants leg, found Jeffrey Dahmer alone cleaning a locker room and then proceeded to bash his head in, according to court papers.

Christopher Scarver said he left Dahmer gurgling on the floor, beat another murderer in a nearby shower room, then returned to his cell, according to a complaint filed Thursday.When a guard asked Scarver why he was back early from work detail, he replied: "God told me to do it. You will hear about it on the 6 o'clock news. Jesse Anderson and Jeffrey Dahmer are dead."

Dahmer, who killed 17 young men and boys in an orgy of necrophilia, dismemberment and cannibalism, had been serving 16 consecutive life sentences. Anderson was serving a life sentence for killing his wife.

Dahmer died on the way to a hospital after guards found him in a pool of blood. Anderson died two days later.

Scarver sang a melancholy song during a court hearing Thursday. The judge ordered the convicted murderer who once claimed to be the son of God to undergo a mental examination.

According to the complaint, at first Scarver said he didn't know why he attacked Dahmer and Anderson. But almost two weeks after the killings, he told interrogators that "the spirit" had come upon him "right there."

He said he had no regrets because he was simply a tool of the spirit.

Scarver, who was on the cleanup detail with Dahmer and Anderson, told investigators that he took the 20-inch-long bar from a situp machine when was alone in the gym the day of the attacks.