Regarded as one of the finest actors of his generation, Sir Ian McKellen had been a pillar of British theatre for decades before venturing to Hollywood. After his early days in London theatre, including a stint in the 1970s with the prestigious Royal Shakespeare Company, he crossed the pond in 1981 to play Antonio Salieri in a Broadway production of "Amadeus" — and took home a Tony Award. The movies beckoned, bringing McKellen to a new level of fame that crested when he was tapped to play the wise and courageous wizard Gandalf in Peter Jackson's "Lord of the Rings" trilogy. Meanwhile, McKellen also made headlines in 1988 when he came out as openly gay in 1988 and was then knighted by the Queen in 1991.

While Gandalf is the most iconic of his many roles, by no means is it his only memorable performance in film and television. For a refresher course on his extraordinary career, read on for a rundown of the 12 best Ian McKellen roles that aren't Gandalf.

Disgraced British Politician John Profumo In Scandal (1989)

The 1989 film "Scandal" exhumes one of the more notorious chapters in British political history, the so-called Profumo affair. In the film, Ian McKellen plays John Profumo, Britain's secretary of state for war, whose affair with 19-year-old dancer Christine Keeler (played by Joanne Whalley), to whom he was introduced by shady osteopath Stephen Ward (John Hurt), led to his political downfall, when it was revealed that Keeler was also dating a suspected Soviet spy. For McKellen, the role had special significance since it was his first screen portrayal after coming out as gay in 1988. As he explained in a 2004 interview with Total Film, he was keen to play a heterosexual character, and John Profumo fit that bill. "That part was a gift because I had just come out, and the perceived wisdom is that once you're openly gay, that's the end of your career," McKellen recalled. "So I thought, 'I'll show them.' Coming out affected my career entirely for the better; my film career has since taken off."

While McKellen also told the outlet he didn't think his performance as Profumo was one of his better ones, critics disagreed. "McKellen perfectly captures the wounded pride of a man hoisted on the twin petards of lust and hypocrisy," wrote Peter Travers of Rolling Stone. "Profumo's shame came not from betraying his wife, family and country, but from betraying his class."

AIDS Activist Bill Kraus In And The Band Played On (1993)

Making its debut on HBO in 1993, "And the Band Played On" boasts a sprawling cast to tell an even more sprawling story: recounting the origins of the AIDS epidemic in the early 1980s. Ian McKellen portrays Bill Kraus, a gay rights activist who served as a liaison between San Francisco's gay community and the district's congressman and was instrumental in promoting the importance of safe sex to prevent the virus from spreading. McKellen's character, depicted as being in a committed relationship with his partner (B.D. Wong), ultimately succumbs to the illness. McKellen captures the moment in an understated yet powerful scene in which his character is exercising in a gym when he notices a small lesion just above his ankle. Immediately recognizing what it means, he looks around furtively to see if anyone else has seen it, then silently hangs his head in grim understanding. That scene is followed by McKellen's character pondering the "cosmic joke" that someone who had so vociferously preached the importance of safe sex was now HIV positive.

In an essay McKellen wrote about his experience on the film, he recalls meeting with director Roger Spottiswoode, who admitted having difficulty finding actors to play gay characters, particularly Kraus. "Although I looked nothing like Kraus, was the wrong nationality and was 15 years older than he when he died of AIDS-related illness, I offered my services," McKellen writes.

Deranged Monarch King Richard III In Richard III (1995)

When Ian McKellen was cast in "And the Band Played On," he was in Los Angeles attempting to raise funding for his passion project, a film version of Shakespeare's "Richard III" set in the 1930s depicting the "crookback king" as a Nazi-like fascist. Having co-written the screenplay, McKellen heads an impressive cast that includes Annette Bening, Nigel Hawthorne, Robert Downey Jr., and Maggie Smith. McKellen, who had starred in a 1990 London stage production of "Richard III," was roundly praised for what was deemed one of the best — if not the best — cinematic adaptations of a Shakespeare play.

The most distinctive element of McKellen's performance in "Richard III" is the character's conceit of speaking to the camera at certain points, addressing the audience directly to draw them into his nefarious machinations. "Richard, the consummate liar, always speaks the truth to the audience, but only to them," McKellen divulged. "That is meant to be disarming for an audience because they alone are privy to what he intends to do, and they become accomplices to his schemes." Another aspect of McKellen's portrayal can be seen in the staging of the play's iconic "Now is the winter of our discontent" speech, which begins as a public declaration to a crowd but eventually changes course to become Richard's private musings. "Richard becomes more intimate, he starts talking about himself," McKellen explained in an interview with KPBS.

Nazi In Hiding Kurt Dussander In Apt Pupil (1998)

While Ian McKellen's Richard III is depicted as a fascist leader with Nazi-like overtones, the actor portrays an actual Nazi in 1998's "Apt Pupil," an adaptation of Stephen King's novella of the same name. Brad Renfro plays Todd Bowden, a teenager obsessed with Nazi atrocities, who discovers his elderly neighbor, Arthur Denker, is actually Kurt Dussander. Dussander is a one-time commandant of a Nazi concentration camp and a notorious war criminal living in the United States under an assumed name. The teenager and the elderly Nazi enter a mutually destructive "friendship" in which the teen strives to become as evil as his mentor. While the movie received mixed reviews, the consensus was that McKellen's impeccable performance was the best part of the film. "McKellen plays Dussander as a withered husk who comes to life when reminded of the butcher he once was," notes one reviewer. "He makes Dussander human, and therefore all the more monstrous."

For McKellen, Dussander proved to be a challenging role. Nevertheless, he rose to the occasion. "There was a part I didn't think I could play," McKellen admitted of his "Apt Pupil" character in an interview with IGN. "It was a fiendishly difficult accent — a Germanic/Californian mix. He was 20 years older than me. I seemed to have pulled it off."

Frankenstein Director James Whale In Gods And Monsters (1998)

Ian McKellen won massive acclaim (and the first of his two Oscar nominations) for playing director James Whale in "Gods and Monsters." The film is a quasi-fictionalized account of the final days of Whale's life, during which he remembers pivotal moments such as serving in World War I and making his best-remembered films, "Frankenstein" and "The Bride of Frankenstein." Whale — who was openly gay during an era when it was far safer to remain in the closet — sparks a friendship with his heterosexual gardener, Clayton (Brendan Fraser), who poses nude for Whale's drawings but winds up rebuffing the elderly director's advances.

McKellen was approaching his sixties when he made the low-budget indie, which earned far more acclaim than anyone had expected. While making "Gods and Monsters," McKellen felt he'd found his footing in movies after spending much of his working life in the theatre. "I don't think anybody hearing my name would have thought, 'Oh, here's an accomplished film actor.' I've made myself into that," McKellen said in an interview with Ain't It Cool News. Meanwhile, McKellen told The Gay & Lesbian Review that, of all the characters he's played, Whale most resonated with him. "I played him when I was roughly the same age as he was, so I could be sympathetic to his feelings," said McKellen. "That is perhaps the part that is closest to my interests."

Mutant Supervillain Magneto In The X-Men Franchise (2000-2014)

Ian McKellen reunited with "Apt Pupil" director Bryan Singer for the 2000 film "X-Men," bringing the beloved comic-book team of mutant superheroes to the big screen. Alongside fellow British thespian Patrick Stewart as the X-Men's leader, psychokinetic Prof. Charles Xavier, McKellen anchored the film as the villainous Magneto, aka Holocaust survivor Erik Lehnsherr, imbued with the power to manipulate magnetism to create powerful force fields and wield massive metal objects as weapons. McKellen returned as Magneto in several sequels, including 2003's "X-2: X-Men United," 2006's "X-Men: The Last Stand," and 2014's "X-Men: Days of Future Past" (rumor has it that McKellen will reprise the role in Marvel's highly anticipated "Avengers: Secret Wars").

While McKellen is the first to admit he's no superhero aficionado. Yet, he found Magneto far more complex than the garden-variety comic book supervillain. "Superman, the Hulk, Spider-Man, even James Bond, they're all the same people — wimps who change out of clothes and become superheroes, discovering their inner light," he explains in the 2018 documentary "McKellen: Playing The Part," via ARS Technica. "That's not Magneto. He's political, a warrior, clearsighted, pained, anguished, determined. That's a part really worth playing."

Shady Aristocrat Sir Leigh Teabing In The Da Vinci Code (2006)

After spending the first half of the 2000s ping-ponging between Gandalf in the "Lord of the Rings" trilogy and Magneto in the "X-Men" films, Ian McKellen jumped into another big film franchise when he signed on for "The Da Vinci Code," the 2006 screen adaptation of Dan Brown's conspiracy bestseller. McKellen plays Sir Leigh Teabing, a British aristocrat and historian who helps Dr. Robert Langdon (Tom Hanks) as he tries to find the legendary Holy Grail. Teabing is ultimately exposed as a liar and murderer, the very man at the heart of the conspiracy that Langdon is trying to uncover, while also effortlessly unleashing huge chunks of exposition for the audience.

McKellen's performance was met with raves from critics. A review in the Financial Times, for example, was one of many that singled out McKellen as the best thing in the movie. "Nothing else matters when he is around," the review stated. "His contribution is so witty and inventive — twirling lines like pipe-cleaner animals, surfing octaves, turning banalities into bons mots — that the former stage thespian must be recaptured for Shakespeare and the live theatre as fast as possible, if necessary by violence and abduction."

King Lear In King Lear (2008)

As they enter their golden years, it's a rite of passage for Britain's most acclaimed actors to play the title role in "King Lear." One of Shakespeare's most complex characters, Lear is an aging king facing his mortality while slipping into madness. His decision to divide his realm among his three daughters leads to an unspeakable tragedy. McKellen played Lear in 2007 in a production for the Royal Shakespeare Company (he returned to the role for an entirely different production over a decade later). The success of that 2007 production led to a television adaptation that aired in the U.S. as part of PBS' "Great Performances" series. The filmed version of "King Lear" garnered McKellen an Emmy nomination and much critical acclaim.

For McKellen, playing Lear night after night was an education. "If you do 100 Lears in a row, the 100th one is going to be more insightful than the first," McKellen said in an interview with CNN's Christiane Amanpour. "I learn, night by night, and King Lear is such a compelling role." He also explained why he continues to be fascinated by Shakespeare. "Why do his wonderfully complicated characters appeal to me? Because they're wonderfully and complicatedly written," he said.

Third-Rate Actor Freddie Thornhill In Vicious (2013-2016)

In 2013, Ian McKellen took an unexpected turn when he starred in his first-ever sitcom, "Vicious." Partnered with fellow British stage icon Derek Jacobi, the two play Freddie and Stuart, an elderly gay couple who have been together for nearly half a century. The couple passes the days by flinging scathing insults at each other. McKellen's character, Freddie, is a narcissistic actor convinced that his big break is right around the corner. He stole a tuxedo he wore in a bit part on "Downton Abbey" and revels in his status as "the 10th most popular 'Doctor Who' villain." While the material may not be Shakespeare, it's a hoot watching these two legendary actors hilariously trading jibes. Freddie, of course, is given the best insults. "I was hoping there might be an ambulance outside when I came home — and they would have already loaded you in," Freddie tells Stuart upon entering their flat.

Interestingly, starring in a sitcom was a bucket list item for McKellen. "It's been an ambition of mine," he said during an appearance at the TV Critics Association press tour (as reported by Collider), equating sitcoms with theatrical farce. "The only aim of farce is to make the audience roll around with laughter in the theater. And that's what this sitcom is attempting to do, and has succeeded in doing. At any age, that's a thrill to be involved in."

Elderly Sherlock Holmes In Mr. Holmes (2015)

Ian McKellen reunited with "Gods and Monsters" director Bill Condon to play Sherlock Holmes in 2015's "Mr. Holmes." While many actors have played Sir Arthur Conan Doyle's iconic sleuth, McKellen portrays Holmes as a 93-year-old recluse who's long since stopped solving mysteries. As his memory fails, he stubbornly tries to recall the details of the unsolved case that led him to retire. Critic Leonard Maltin was among the many reviewers to praise McKellen for the actor's lion-in-winter portrayal of Holmes. "McKellen is utterly compelling, both as the sly nonagenarian and his somewhat younger self, portrayed in a series of flashbacks," Maltin writes. "The camera focuses on his face and registers every nuance of this masterful performance."

Given the who's who of actors to have played the character over the years (a lengthy list that includes Jonny Lee Miller, Benedict Cumberbatch, and Robert Downey, Jr.), McKellen approaches the role in a similar way to a Shakespeare play. "You don't look back at what other people have done, you can't match their achievements, but you can bring your own sense of what it's all about," he told IndieWire. "He's only actually really happy when he discovers he's got a heart and can relate to other people," McKellen says of his take on Holmes. "He's a bit of a sociopath. You wouldn't want to spend your evening with Sherlock Holmes, but by the end of the movie, perhaps you would."

Actor's Assistant Norman In The Dresser (2015)

First mounted onstage in 1980, Ronald Harwood's play "The Dresser" has been the basis for two films, one in 1983 and another in 2015. Ian McKellen stars in the latter, playing Norman, the titular dresser-personal assistant to a once-famous elderly actor (Anthony Hopkins), long past his prime and identified only as Sir. Starring in a ramshackle Shakespeare production during the London blitz, Sir's mental and physical states are rapidly deteriorating from the ravages of age. As Sir struggles to remember his lines, Norman does everything he can to keep the production from flying off the rails, maintaining the facade that Sir isn't succumbing to dementia.

According to McKellen, he was enticed into joining the dark character study (which aired on BBC in Britain and the U.S. on Starz) for one reason: the chance to share the screen with Hopkins. "I have known Anthony slightly but we have never worked together and this was ideal because it was in a world that we both knew and have a great affection for and we had a lot of laughs," McKellen told What to Watch. "It was bliss," he says of working with Hopkins, "that is the reason I wanted to do it so much it was just to be in his presence."

Con Man Roy Courtnay In The Good Liar (2019)

"The Good Liar" features Ian McKellen co-starring with the formidable Helen Mirren. McKellen plays long-in-the-tooth con man Roy Courtnay, who sets his sights on Mirren's character, wealthy widow Betty McLeish. McKellen is once again directed by Bill Condon, who takes viewers along on a cutthroat game of cat and mouse that unfolds like a puzzle being solved until a wild reveal turns the tables on Courtnay when viewers discover just who these two really are. Reviews for the film were decidedly mixed; The Wrap declared the actors to be "wasted in disappointing crime drama," while IndieWire enthused, "Pleasant and preposterous in almost precisely equal measure, the film never offers anything less than two all-time British actors having the time of their lives, which makes it hard to get frustrated that it seldom offers anything more."

McKellen found Mirren to be a kindred spirit, given the decades of film, television, and (of particular importance to McKellen) theatre under her belt. "Helen's played Shakespeare's Cleopatra three times, and I've played King Lear three times; we're the same sort of person," McKellen explained in an interview with the Sydney Morning Herald.

Read this next: The 15 Best Anthony Hopkins Roles Ranked

The post The 12 Best Ian McKellen Roles That Aren't Gandalf appeared first on /Film.