Dallas Police have arrested a man after the weapon with which he accidentally shot himself was linked to a murder case from 2021.

Per an arrest warrant affidavit obtained by The Dallas Morning News, 28-year-old Laquavana Ladarien Goode is accused of fatally shooting 62-year-old Lonnie Lewis on July 25, 2021.

According to the DMN, police received the call reporting Lewis’ shooting at about 8:45 a.m. last July.

Officers responded to the homeless encampment in the 1700 block of Chestnut Street, on the border between Deep Ellum and South Dallas, to find Lewis with a gunshot wound to his left bicep.

Witnesses told police that a car had driven by the homeless encampment that morning, and its occupant had opened fire as people slept.

According to the affidavit, the witnesses were unaware the shots had hit anyone. However, when they tried to wake Lewis hours later, they found him dead in his sleeping bag with a bullet wound.

Police took several shell casings as evidence but could not solve the case until Goode accidentally shot himself while parked at a Walmart in Lewisville on January 25.

Goode called Dallas Police for help after accidentally shooting himself in the knee. When officers tested Goode’s gun, they were notified it was an apparent match for the shell casings gathered at the scene of Lewis’ murder.

According to the affidavit, Goode told officers that the gun had belonged to him since 2019 and that he had not let anyone borrow it. The 28-year-old’s car also matched the description of the one that drove by the homeless camp. When asked, Goode told officers that the car had been his since 2019.

The affidavit states a firearms expert tested the gun Goode shot himself with and found that it allegedly fired the bullet that killed Lewis.

Goode was booked into the Dallas County Jail on March 2 on a murder charge, and his bail has been set at $150,000.