Updated Nov. 19 at 1:47 p.m.

Kyle Rittenhouse, the 18-year-old who fatally shot two people during the unrest last year in Kenosha, Wis., has been acquitted of all charges in a criminal trial that divided the nation over questions about gun rights, violence at racial justice protests and vigilantism.

The verdict, delivered Friday, follows a highly-watched trial in which prosecutors struggled to overcome Rittenhouse's claim that he acted in self defense on the night of the shootings.

In two weeks of testimony and evidence — led by a day-long turn on the stand by Rittenhouse himself — defense attorneys were able convince the jury of 12 that the night of Aug. 25, 2020, was filled with deadly peril for the then-17-year-old.

Jurors deliberated for roughly 27 hours over the course of four days before pronouncing Rittenhouse not guilty on all five counts: first-degree intentional homicide, first-degree reckless homicide, first-degree attempted intentional homicide and two counts of first-degree reckless endangerment. The jury was also asked to consider lesser versions of several counts, but were not swayed.

Rittenhouse armed himself with an AR-15-style rifle on a night of unrest in Kenosha sparked by the police shooting of Jacob Blake, a 29-year-old Black man who was left paralyzed after an encounter with a white officer. Rittenhouse, who lived across the state line in Antioch, Ill., testified that he intended to act as a medic and help protect private property.

But the night spiraled out of control. In a series of chaotic encounters with protesters, documented thoroughly by photograph and video, Rittenhouse shot and killed Joseph Rosenbaum, 36, and Anthony Huber, 26, and injured Gaige Grosskreutz, then 26.

During the trial, Rittenhouse said he feared for his life in all three cases: Rosenbaum, he said, had chased him and was grabbing for his rifle. Afterward, as he ran toward police, others, including Huber and Grosskreutz, began to chase him. Huber struck him with a skateboard, visual evidence confirms. Grosskreutz was holding a loaded Glock pistol.

"Mr. Rosenbaum was chasing me. He said he was going to kill me if he got me alone. I was alone. I was running from him. I pointed it at him, and it didn't stop him from continuing to chase me," Rittenhouse testified.

Prosecutors argued that Rittenhouse was responsible for creating those situations. He chose to bring a deadly rifle into a dangerous environment, they said, and chose to stay there even after being separated from a friend.

Rosenbaum was unarmed, they pointed out, yet Rittenhouse shot him four times, all as Rosenbaum was falling to the ground. Grosskreutz testified that he feared for his own life, given the presence of Rittenhouse's rifle, and was trying to disarm Rittenhouse, not kill him. Asked on the witness stand what was going through his mind during their encounter, Grosskreutz replied, "that I was going to die."

But prosecutors also made repeated missteps, prompting defense lawyers to request a mistrial on two occasions, the first over Assistant District Attorney Thomas Binger questioning Rittenhouse's right to remain silent and a second over a drone video that prosecutors had inadvertently compressed when sharing it with defense lawyers.

In the end, jurors were ultimately persuaded by Rittenhouse's version of events.

"Some might have had concerns about the decisions that brought Mr. Rittenhouse to Kenosha that evening and how he reacted. However, unless the state proves beyond a reasonable doubt that this wasn't reasonable and that he didn't believe that he needed to use deadly force to defend himself, then the only proper verdict is acquittal," said Chris Zachar, a criminal defense attorney based in La Crosse, Wis., who was not involved in the trial.

The case sparked passionate reaction by the American public since the moment Rittenhouse fired his rifle that night.

Nearly every aspect of the case touched on some of the country's most contentious fault lines: Second Amendment rights, self-defense, violence at racial justice protests, vigilantism and perceptions of how police and the justice system treat white people and people of color differently.

Supporters saw Rittenhouse as a champion of gun rights who bravely stepped in to protect a community from what they considered lawless riots. Opponents instead saw an irresponsible vigilante who came to Kenosha to play dress-up as a police officer — a "chaos tourist," as Binger put it.

"What comes to mind is the comment that, 'How do you stop an active shooter? Good guys with guns.' In this case, you've got Mr. Rittenhouse, who fires off four shots at somebody who's unarmed and then continues to shoot people," said Zachar. "Who's the good guy? Who's the bad guy in that scenario? No, nobody really knows."

For the past two weeks, the trial has commanded the nation's attention — thanks in no small part to the fact that nearly every minute of the proceedings has been broadcast widely on TV and livestream video. Everyone from LeBron James to Marjorie Taylor Greene weighed in before the verdict.

Copyright 2021 NPR. To see more, visit https://www.npr.org.