(CNN)Last month, five Chicago teenagers were charged with first-degree murder after their alleged accomplice in an attempted burglary was fatally shot by the elderly homeowner.
Now prosecutors are dropping the murder charges against the five teens, the state's attorney of Lake County, Illinois, said in a statement.
The state's attorney, Michael G. Nerheim, reached an agreement with the teens' defense attorneys that "ensures all offenders will be held responsible and face appropriate sentences," he said in statement, after he reviewed the evidence.
The one teenager who was named, 18-year-old Diamond Davis of Chicago, will appear in court Thursday and be charged with conspiracy to commit burglary and a criminal trespass to a motor vehicle. She's expected to plead guilty next week, Nerheim said.
The other teens are juveniles and have not been named. Nerheim did not say what charges they will face, citing laws that restrict the information that can be shared in juvenile court proceedings.
Reached by CNN, the Lake County Public Defender's Office, which is representing Davis and one of the unnamed juveniles, said it does not comment on pending cases.
Jason Dreifuss, who said he represents the 16-year-old, said, "We're grateful that the prosecutor took a close look at this case and they came to the right decision to dismiss the murder charges. And that was the right result."
CNN has not been able to reach the attorneys representing the other juveniles.
Resident told suspects to leave
According to Nerheim's office, the six teens awakened a 75-year-old resident of the village of Old Mill Creek around 1:15 a.m. on August 13. He saw the headlights of a stolen Lexus the teens were driving in his driveway and grabbed his firearm, Nerheim said.
He ordered the strangers off his property, but they allegedly refused to leave, Nerheim said. One had something in his hand, the resident later told police, and believing himself in danger, the resident fired his gun several times, striking one of the strangers -- later revealed to be the 14-year-old -- with a single bullet, the prosecutor said.
The teens all ran back to the stolen Lexus and drove away, Nerheim said.
The teens stopped the car in Gurnee, a township within Lake County, and told a police officer their friend had been shot, the prosecutor said. As the officer examined the injured teen, four of the suspects allegedly drove off in the stolen Lexus, while the fifth was taken into custody, according to Nerheim.
The teens only stopped after reaching Chicago and running out of gas, Nerheim said. They fled from police, but were eventually taken into custody.
Investigators soon located a 10-inch hunting knife that belonged to one of the defendants in the driveway where the shooting occurred, Nerheim said.
Prosecutor decided to exercise 'discretion'
Nerheim previously justified the murder charge by saying the defendants placed their 14-year-old accomplice in danger by allegedly arming themselves and ignoring the resident's demand to leave the property.
"The dilemma I have faced for the last five weeks surrounding the Old Mill Creek case has been balancing justice, the safety of our community, and recognizing the ages of the offenders involved," Nerheim said in his statement.
The law holds felons accountable for deaths that occur during the crime, he said, adding, "Had they not made the decisions they did make early Tuesday morning, this 14-year-old would still be alive today."
But Nerheim said Thursday that while the facts of the alleged crime still fit the charge of felony murder, he had "exercised discretion in this situation."
"It is important to note that I make decisions based on the law, the evidence and facts of each individual case. I do not make charging decisions based on public comments or from what is written on social media," he said.
"My job as Lake County State's Attorney is to follow the details of the case and make the best decision I can with the facts, while knowing every decision I make is subject to the utmost scrutiny," he said.
Nerheim now believes the agreement will ensure that the community stays safe while treating the suspects fairly.