1995's GoldenEye was a big return for James Bond, who'd been last seen in 1989's License to Kill -- then the longest gap between James Bond films in the franchise's history. The movie was also the debut of Pierce Brosnan in the role, taking the part of Bond from a departing Timothy Dalton following a controversial era for the character. Bringing a Cold War-codified character into a post-USSR world was always going to be a challenge, but the film ended up being a success.

GoldenEye became a box office hit, was critically well-received, and inspired a fan-favorite video game, GoldenEye 007. But the film also stands as a unique junction point for the series, with Brosnan actually almost losing the role to a handful of other notable performers -- one of whom would go on to fight Brosnan within the movie itself. Here's how Sean Bean lost the role of James Bond -- but impressed the film's producers enough to become the villain instead.

RELATED: Forget Blofeld, Le Chiffre Is James Bond's Best Villain

How Pierce Brosnan Became James Bond

Alec Trevelyan aims his gun at James Bond in GoldenEye

Following the lackluster response to License to Kill, the James Bond series was suddenly mired in legal entanglements for several years. As reported by Variety at the time, once the dust settled and the rights to the movies were decided, Timothy Dalton stepped away from the series. Development on the film that would become GoldenEye began in earnest with casting. The producers took an interest in two specific performers: Pierce Brosnan -- who'd been offered the role years earlier, only to turn it down due to commitments to Remington Steele -- and Liam Neeson.

Fresh off an Academy Award nomination for his performance in Schindler's List, Neeson actively considered taking the role. But his future wife Natasha Richardson convinced him to say no, leaving the path open for Brosnan. However, auditions were still held for the role, with Doctor Who's Paul McGann and The Matrix Resurrections' Lambert Wilson reportedly auditioning. However, the most impressive audition turned out to come from Bean.

RELATED: The Lesson of Quantum of Solace Showcases the WGA's Importance

How Sean Bean Was Cast As 006

Sean Bean's Alec Trevelyan and Pierce Brosnan's James Bond kneeling with guns in GoldenEye.

Bean auditioned for the part of James Bond twice -- against both Timothy Dalton and Pierce Brosnan -- and reportedly impressed the producers each time. This isn't surprising given Bean's other strong performances in films like The Lord of the Rings trilogy and shows like Game of Thrones and Snowpiercer, highlighting his range and passionate performances regardless of genre. However, he lost out on the part both times. He did receive a pretty good consolation prize, however, as the script to GoldenEye was still being rewritten during this period to reflect the changing politics of the real world -- and his audition was good enough to inspire a tweak to the plot. Earlier iterations of the script had the villain be Augstus Trevelyan, a former mentor to Bond who'd gone rogue. After performers like Anthony Hopkins were approached about the role (but turned it down), the character was rewritten to be a fellow spy and peer to Bond. This allowed Bean -- who was only six years younger than Brosnan -- to appear in the movie as rogue ex-MI6 agent Alec Trevelyan.

Bitter about the United Kingdom's refusal to accept his parents as refugees following WWII (leading directly to their deaths), Trevelyan kept his anger a secret while being trained and educated by MI6 -- fashioned into a deadly agent much like Bond himself. However, whereas Bond's loyalty was genuine, Trevelyan eventually became a criminal mastermind who used his newfound power to target Britain. Bean's role as Trevelyan remains a fan favorite almost 20 years after its debut, a cunning and dark foil to Bond that feels more in line with the villains of modern James Bond movies over the more supervillain-esque enemies of earlier films in the series. Even though he may never have gotten to be Bond himself, at least Sean Bean got to do the next best thing and try to kill him.