A man who was shot and treated at the hospital over the weekend was charged Monday after police said he was shot while committing a home invasion Friday.

The Madison County Sheriff's Office said Brenton Webster — a 29-year-old man who ended up at a Casey's General Store in Alton, Illinois, with a gunshot wound at around 10:30 Friday morning — was fleeing the scene of a home invasion.

Police talked to Webster before he was sent to the hospital. They said Webster told them he was shot during a Craigslist meeting gone wrong near the intersection of Fosterburg Road and Interstate 255 in unincorporated Madison County.

During the investigation, police uncovered a different story. They said Webster was shot in a home on the 300 block of Tremont Drive in Godfrey, Illinois.

According to police, Webster got into the home by asking to use the bathroom. Then, when he was in the house, he attacked the homeowner with a gun. The homeowner was also armed and shot Webster.

Police said Webster was treated and released into the custody of St. Louis Metropolitan Police over the weekend.

He is facing three counts; home invasion, armed robbery and unlawful possession with the intent to deliver cocaine. Police said they found evidence leading to the drug charge during the investigation.