LOS ANGELES — Archie Andrews will die taking a bullet for his gay best friend.

The famous freckle-faced comic book icon is meeting his demise in Wednesday’s installment of “Life with Archie” when he intervenes in an assassination attempt on Kevin Keller, Archie Comics’ first openly gay character. Andrews’ death, which was first announced in April, will mark the conclusion of the series that focuses on grown-up renditions of Andrews and his Riverdale pals.

“The way in which Archie dies is everything that you would expect of Archie,” said Jon Goldwater, Archie Comics publisher and co-CEO. “He dies heroically. He dies selflessly. He dies in the manner that epitomizes not only the best of Riverdale but the best of all of us. It’s what Archie has come to represent over the past almost 75 years.”

Keller’s character first joined Veronica Lodge, Betty Cooper, Jughead Jones and Reggie Mantle in the Archie Comics spin-off “Veronica” in 2010. He later appeared in his own solo title. In “Life with Archie,” Keller is a married military veteran and newly elected senator who’s pushing for more gun control in Riverdale after his husband was involved in a shooting.

“We wanted to do something that was impactful that would really resonate with the world and bring home just how important Archie is to everyone,” said Goldwater. “That’s how we came up with the storyline of saving Kevin. He could have saved Betty. He could have saved Veronica. We get that, but metaphorically, by saving Kevin, a new Riverdale is born.”

Andrew Wheeler, who writes about the comic book industry at ComicsAlliance.com, praised the way that Andrews will be killed off. He wrote on Monday that “Archie’s sacrifice isn’t just a moment of heroism; it offers an unambiguous condemnation of America’s lax gun laws” and said that it’s “not surprising to see Archie Comics tackling such a serious issue” because the publisher “doesn’t shy away from risky ideas.”

Who shot Archie? Goldwater isn’t spoiling the killer, only teasing it’s a stalker who wanted to take Keller down.

Andrews’ final moments will be detailed in “Life with Archie” No. 36, while issue No. 37 will jump forward a year and focus on the Riverdale gang honoring the legacy of their red-headed pal, who first appeared in comics in 1941 and went on to become a colorful icon of wholesomeness. Other incarnations of Andrews will continue to live on in Archie Comics series.

In recent years, deaths of high-profile comic book characters like Peter “Spider-Man” Parker and Steve “Captain America” Rogers have made headlines and garnered intense reaction from fans. Goldwater notes that Andrews’ passing isn’t just a publicity stunt but also a lesson about gun violence and a declaration of diversity in the new age of Archie Comics.

“Archie is not a superhero like all the rest of the comic book characters,” said Goldwater. “He’s human. He’s a person. When you wound him, he bleeds. He knows that. If anything, I think his death is more impactful because of that. We hope by showing how something so violent can happen to Archie, that we can — in some way — learn from him.”

“Life with Archie” was launched in 2010 after Archie Comics writers envisioned alternate futures where Archie married both Veronica and Betty. Over the past four years, storylines in the more socially relevant series aimed at longtime Archie fans have included Keller’s marriage, the death of teacher Ms. Grundy and sometimes Archie love interest Cheryl Blossom tackling breast cancer and affordable health care.

Archie Comics has also more broadly strived to appeal to modern sensibilities by launching a spin-off series called “Afterlife with Archie” that envisions a zombie outbreak coming to Riverdale and enlisting “Girls” creator and star Lena Dunham to write a four-part Archie story set for release next year that chronicles the production of a reality TV show in Riverdale.

“This makes a great deal of sense given how topical ‘Life with Archie’ has become since it abandoned the weird wondrous parallel universe storyline of its early issues,” wrote Chris Cummins of DenOfGeek.us. He added: “Not to be too grandiose, but this demise is a fitting and tonally perfect tribute to a character who has always put his friends first. This is a publicity stunt for sure, but one with heart that will have permanent ramifications.”