A heroic student killed protecting his classmates during a mass shooting has been honoured as a Jedi master in Star Wars' latest film.

The Lucasfilm franchise told the family of 21-year-old Riley Howell that it “wanted to pay a special tribute” to the student, Sky News reported, after learning he was a fan of the series.

The 21-year-old was killed saving classmates during a mass shooting at the University of North Carolina on 30 April. Police said Howell fought the gunman as he opened fire, helping to prevent further deaths.

Howell and one other student, 19-year-old Ellis Reed Parlier, were killed in the shooting, while four others were injured.

A representative with the production company reportedly tipped off the family about Howell being honoured in the franchise’s latest release, The Rise of Skywalker, nearly a month after the shooting.

“Riley's courage and selflessness brings out the Jedi in all of us”, the representative reportedly wrote to the family in a statement.

Every cameo in Star Wars: The Rise of Skywalker Show all 14 1 /14 Every cameo in Star Wars: The Rise of Skywalker Every cameo in Star Wars: The Rise of Skywalker Jodie Comer The Emmy Award-winning star of Killing Eve shows up very briefly in flashback as Rey’s mother. Getty Images Every cameo in Star Wars: The Rise of Skywalker John Williams JJ Abrams rewards the composer’s hard work on the franchise with a cameo. Williams plays the composer on the planet Kijimi, seen shaking his head at the group of main characters as they storm into the droid shop. Getty Images for Turner Every cameo in Star Wars: The Rise of Skywalker JJ Abrams Remember the shaky droid who keeps uttering “No, thank you” whenever anyone goes to touch him? That’s the voice of the film’s director himself. Every cameo in Star Wars: The Rise of Skywalker Lin-Manuel Miranda Chances are you didn’t spot the Hamilton superstar, but we did – towards the end of the film, he’s one of the Resistance Fighters in the background as Rey reunites with a tearful Finn and Poe. Getty Images Every cameo in Star Wars: The Rise of Skywalker Harrison Ford Yes, you read that correctly. Harrison Ford returns as a spiritual adviser-of-sorts to his son, Ben (Driver), whose days as Kylo Ren come to an end after a nice little pep talk from the father he killed. Jordan Strauss/Invision/AP Every cameo in Star Wars: The Rise of Skywalker Mark Hamill Mark Hamill's appearance may not be a surprise considering everybody and their aunt assumed Luke Skywalker would return as Force Ghost, but it’s still great to see him for one last time on the big screen. (Photo by Jon Kopaloff/Getty Images) Every cameo in Star Wars: The Rise of Skywalker Hayden Christensen In the climactic showdown between Rey and Emperor Palpatine (Ian McDiarmid), a host of Jedi voices will her to defeat the Sith once and for all. Among those that can be heard include Hayden Christensen's Anakin Skywalker. Getty Images Every cameo in Star Wars: The Rise of Skywalker Samuel L Jackson In the climactic showdown between Rey and Emperor Palpatine (Ian McDiarmid), a host of Jedi voices will her to defeat the Sith once and for all. Among those that can be heard include Samuel L Jackson's Mace Windu. Frazer Harrison/Getty Images Every cameo in Star Wars: The Rise of Skywalker Liam Neeson In the climactic showdown between Rey and Emperor Palpatine (Ian McDiarmid), a host of Jedi voices will her to defeat the Sith once and for all. Among those that can be heard include Liam Neeson's Qui-Gon Jin. Getty Every cameo in Star Wars: The Rise of Skywalker Frank Oz In the climactic showdown between Rey and Emperor Palpatine (Ian McDiarmid), a host of Jedi voices will her to defeat the Sith once and for all. Among those that can be heard include Yoda himself, Frank Oz. Getty Images Every cameo in Star Wars: The Rise of Skywalker Freddie Prinze Jr In the climactic showdown between Rey and Emperor Palpatine (Ian McDiarmid), a host of Jedi voices will her to defeat the Sith once and for all. Among those that can be heard include Star Wars: Rebels character, Kanan​, who is voiced by Freddie Prinze Jr. Getty Images for NBC Every cameo in Star Wars: The Rise of Skywalker Billy Dee Williams Billy Dee Williams – the original Lando Calrissian (sorry, Donald Glover) – shows up a few times, much to the happiness of Chewbacca. Getty Images Every cameo in Star Wars: The Rise of Skywalker Wedges Antilles It might have previously been announced by Lawson’s family, but the original Star Wars actor shows up extremely briefly as fighter pilot Wedge Antilles. His appearance elicited huge cheers from the crowd we saw it with. Lucasfilm Every cameo in Star Wars: The Rise of Skywalker Dominic Monaghan Not so much a cameo, considering he has a decent amount of lines, but the Lord of the Rings and Lost star shows up as Resistance mechanic Beaumont Kin. He shares the majority of his scenes with Kelly Marie Tran, who returns as Rose Tico. Getty Images

Howell’s name was then reimagined for the name of a Jedi — who are described as guardians of peace and justice in the Star Wars universe’s Galactic Republic — in part of the film’s “visual dictionary”.

“We hope that you may rejoice in his memory, and we join you in honouring his life and example”, the statement continued. “The Force will be with Riley, and all of you, always."

The dictionary was published earlier this month, titled Star Wars: The Rise of Skywalker — The Visual Dictionary, and named him as a character called “Ri-Lee Howell”.

Ri-Lee Howell was described as a “Jedi Master and historian” credited with compiling “many of the earliest accounts of exploration and codifications of The Force”.

Howell’s long-term girlfriend celebrated the tribute in a video posted to TikTok, in which she thanked Lucasfilm for the tribute and wrote in a caption: “I’m so lucky to know a Jedi master.”