A prosecutor’s decision to charge two teens with murder for starting a gunfight that he said led to the police shooting of 8-year-old Fanta Bility at a football game in Sharon Hill has divided legal experts and outraged community members eager to see the officers charged.

Fanta’s death also highlighted whether and when it’s appropriate for police to shoot when gunfire might endanger bystanders.

Here is a guide to the complexities of the case:

What happened that left Fanta dead?

Fanta was killed by police in August as she and her family were leaving the game. The police, prosecutors said, were firing at a vehicle they believed was connected to a shooting between two teenagers. The officers were mistaken — the car was not involved — and one of their bullets flew past the car and killed Fanta. Her older sister and two others were wounded.

Three officers fired at the car. It’s unclear who fired the fatal shot.

Under the law, police may only shoot at a fleeing suspect if an officer believes that person poses a threat to them or others.

Who has been charged?

Earlier this month, Delaware County District Attorney Jack Stollsteimer announced that he had charged Angelo “AJ” Ford, 16, and Hasein Strand, 18, with first-degree murder in Fanta’s death.

The teens had been arguing during the football game and decided to settle their dispute with illegal guns they both were carrying, according to court filings. The pair, who were about 140 feet from police, exchanged several shots, authorities said. They missed each other but wounded a bystander.

What’s the prosecution legal theory?

In charging the teens, Stollsteimer’s office relied on a legal concept called “transferred intent,” saying the teens’ actions directly led to Fanta’s death. In a statement, Stollsteimer said their arrests “begin the criminal process for those that initiated the deadly events of August 27th by shooting to kill at a high school football game.”

Some legal experts and others question that decision. Critics say the first-degree murder charges distract from the conduct by police, who directly caused Fanta’s death by firing in the direction of a crowd.

What is ‘transferred intent’?

By its textbook definition, transferred intent applies, experts say, when a shooter aiming for a specific victim misses and kills a third, completely unrelated person.

The legal basis for charging the two teens “is very simple,” Tanner Rouse, Stollsteimer’s first assistant DA, said in a statement. “They were attempting to kill one another that night, and as a direct result a little girl is dead.”

Guyora Binder, a researcher at the University of Buffalo School of Law and expert on transferred-intent cases, disagreed with the law’s application.

“The killer was not even someone being shot at by one of the defendants,” Binder said “So, we have a very attenuated series of events.”

» READ MORE: Relatives of the 8-year-old girl fatally shot by Sharon Hill police want the officers fired

Binder noted that, within Pennsylvania, less complicated applications of the principle have been accepted and upheld by courts.

In Lackawanna County in 2005, prosecutors charged Edward Nunn with involuntary manslaughter, after Scranton police officers fatally shot a woman in his apartment while investigating his involvement in an armed robbery. At the time of the shooting, authorities say, Nunn was pointing a realistic-looking pellet gun at the officers, and they opened fire, striking Erin Dermody.

A county jury convicted Nunn in the woman’s death and the state Superior Court later denied his appeal, saying he “could have foreseen that drawing police fire in a small, dark room could result in harm to … innocent bystanders.”

But in Fanta’s case, Binder said, the burden for proving first-degree murder, which requires intent, is much higher, because the initial shooting was removed from the fatal gunfire.

» READ MORE: A lawsuit in the death of an 8-year-old girl who was killed by police at a football game named the wrong officer, sources said

Bruce Castor, the lawyer for Fanta’s relatives, has said they want authorities to focus on police.

“From the point of view of the Bility family,” he said, “these officers killed Fanta and they need to be held accountable for that, and those responsible for their supervision and training need to be held accountable for that.”

Some legal experts questioned why prosecutors did not bring a lesser charge against the teens, such as second-degree murder or manslaughter. A second-degree murder case would hinge on state law involving felony murder, under which defendants can be convicted for taking part in a felony that results in a death, even if they were not the actual killer.

What happens to the officers who shot Fanta?

That’s unclear. The officers who fired the shots, whose names have not been released, have been put on administrative leave. Stollsteimer said their gunfire remains under investigation and a grand jury is looking into the matter.

» READ MORE: The Sharon Hill police officers who shot an 8-year-old girl at a football game acted with recklessness, a lawsuit says

What rules govern when police may shoot at a car?

No uniform policy in Pennsylvania dictates when police should or shouldn’t fire at moving vehicles, according to Emanuel Kapelsohn, an expert in police use of force and a former law enforcement firearms instructor in the Lehigh Valley.

Instead, he said, most departments set their own policies.

In Philadelphia, for instance, police policy stipulates that an officer may not fire at a moving vehicle unless the occupants are threatening the officer or someone else with deadly force in another manner — the example given is if someone in the car is firing a gun.

Kapelsohn said those policies make sense. He cited how hard it is for police to accurately hit a moving object and the possibility that a wounded or slain driver might lose control of the vehicle, making it even more dangerous.

It’s unclear what, if any, policy on the issue is in place in the Sharon Hill Police Department.

Borough Solicitor Sean Kilkenny would not answer when asked if the Sharon Hill Police Department had a policy governing shooting at a vehicle. He told a reporter to file a request under the state Right to Know Law.

Phillip Stinson, a criminal justice professor at Bowling Green State University in Ohio, said he doesn’t think the first action by the officers should have been firing on a vehicle they weren’t sure was involved in gunfire. Moreover, Stinson said the officers appeared to give too little weight to the risk to bystanders.

“I just don’t think they had situational awareness,” he said.

Seth Stoughton, a former police officer and criminal-justice expert at the University of South Carolina, said officers are taught to consider their surroundings when making a decision to fire, especially what their backstop will be — the area behind where they are firing.

In a crowded area, such as the intersection in Sharon Hill where the shooting took place, officers are better served “bringing order to chaos, and not complementing or confounding that chaos,” he said.