CHICAGO (CBS) — An Evanston man has been charged with murder, after an alleged accomplice was shot and killed Tuesday during a home invasion and robbery attempt in far north suburban Lindenhurst.

Police said, around 2:30 a.m. Tuesday, 23-year-old Michael Zachery and a 34-year-old man drove to a home on the 300 block of Teal Road in Lindenhurst to buy a gun. Once inside the home, Zachery and the other man allegedly tried to rob the man who was selling the gun, and hit him several times with a hammer.

michael zachery Man Charged With Murder After Accomplice Shot And Killed In Robbery Attempt

Michael Zachery is charged with murder and armed robbery. (Credit: Lake County Major Crimes Task Force)

The victim then shot Zachery’s accomplice in self defense, police said. That man was pronounced dead at the scene. The Lake County Coroner’s office said he has been identified as Joseph McHaney, of Chicago.

Someone inside the home held Zachery there until police arrived. He was arrested and charged with first-degree murder and armed robbery.

Zachery was due to appear for a bond hearing Wednesday morning in Lake County Court.