It's often joked about that every background character in Star Wars has a name and extensive backstory. And while that's only partly true, the R5 droid from Star Wars: A New Hope is a prime example of why this joke exists. Despite only appearing briefly, R5 has a tragic backstory explaining why he's one of the noblest heroes in the entire franchise.

After C-3PO and R2-D2 are captured by the Jawas, they get thrown into their Sandcrawler with a number of other broken droids. They're then lined up outside the Lars homestead, and Owen picks out a white and red astromech droid to help out on the farm. This unit, named R5-D4, rolls forward as the motivator on top of his head explodes, leading Owen to purchase R2 instead. Of course, that kick-starts Luke's path to becoming a hero. But while it all appears to be a stroke of good fortune, it was actually all part of R5's plan.

RELATED: From Mace Windy to Jedi-Bendu, Star Wars' Early Drafts Had Some Strange Names​​​

R2-D2 and R5's Introduction in Star Wars

R5-D4 in a Sandcrawlet in A New Hope

The 2017 book Star Wars: From A Certain Point of View tells 40 short stories from across the Skywalker Saga. And one such tale recounts the events onboard the Sandcrawler in A New Hope, as R2-D2 and R5-D4 had some time to get to know one another. In fact, things got off to a very rocky start, as R5 awoke to R2 trying to sabotage his circuits and shut him down. But the actions were not out of hate, as R2 was trying to ensure he would get sold by the Jawas so he could find Obi-Wan.

Through a series of beeps, R2 says, "I must be sold tomorrow. I have to escape this Sandcrawler. The fate of the galaxy depends on it. The Rebellion needs your help." R5 understands but replies that if he does not find an owner soon, he will likely succumb to power failure. R2 shows his sympathies but continues to stress the importance of his task, leaving R5 to think about it.

RELATED: Star Wars Has the Perfect Enemy Waiting for Rey Skywalker's Return

R5 Saves the Star Wars Galaxy

The next day, the droids are lined up, and R5 is chosen by Owen. But in a moment of heroic sacrifice, he decides to blow up his own motivator, allowing R2 to go instead. The two droids part ways, but R5 unknowingly saves the entire galaxy and triggers a series of events that lead to the Emperor's demise. However, R5 got no reward, as he soon had to play dead as Imperial Stormtroopers raided the Sandcrawler and murdered all the Jawas inside.

From here, R5 began a trek across the desert in hopes of finding a new owner to help restore his systems. And for a long time, that was the end for the heroic droid, but The Mandalorian has since shown the droid's fate, as R5 is seen working for the friendly mechanic on Tatooine who helps Din Djarin fix up his ship. Despite appearing on-screen for a minute, R5 has an extensive backstory, appears in The Mandalorian and even has a background cameo in Star Wars: Attack of the Clones. It just goes to show that everyone in the Star Wars galaxy has a story and that heroes can be found in the most unexpected places.