(CNN) -- A Tacoma, Washington man who allegedly asked neighbors for permission to dump a dead body in their trash can appeared in court Friday.

The man is accused of committing murder with a firearm, according to a court document.

CNN is not identifying the man because neither he nor his attorney could be reached for immediate comment.

Witnesses told police that they heard what sounded like fireworks about an hour before the man appeared at their house, asking them to help him sell crack cocaine, the document said. A short time later, he returned and asked the witnesses to help him dispose of a body, according to the document.

They thought he was kidding.

But they contacted police when they noticed what appeared to be a body in their trash can later that night.

Police found a victim upside down in the container.

The man claimed he lured the victim to his house and then shot him in the head, the witnesses told police. They said he appeared to be "slightly mentally challenged" and told them the victim "beat up his baby's momma."

The man admitted he shot the victim when questioned by detectives but said it was an accident, police said. He also told police the victim brought the gun used in the crime, as well as the cocaine that was found on the premises.

Police spokesman Mark Fulghum told CNN affiliate KIRO in Seattle that the suspect has given police "three or four different versions about what happened."

"He's given a few different variations of what took place," Fulghum said. "So right now, we've got to sort out those and match the evidence and get the true story."