Actor Alan Rickman died on Jan. 14 at the age of 69. Over his decades-long career, he has played a variety roles, but was known for being the bad guy. (Erin Patrick O'Connor/The Washington Post)

Alan Rickman, the classically trained English actor who excelled as tormented fiends and aristocratic weasels in films such as “Die Hard” and the “Harry Potter” franchise, and who also used his languid manner to surprising effect in romantic comedy, died Jan. 14 in London. He was 69.

His death, from cancer, was confirmed by Katharine Viner, editor in chief of the London Guardian, with whom Mr. Rickman collaborated on the play “My Name Is Rachel Corrie,” about the young American activist killed by an Israeli army bulldozer in the Gaza Strip in 2003.

A silky-voiced stalwart of the British stage, Mr. Rickman drew a Tony nomination on Broadway in 1987 as the creepily seductive Valmont in “Les Liaisons Dangereuses,” produced by the Royal Shakespeare Company. That recognition led to his screen breakthrough the next year as a debonair but violent criminal mastermind in the first and best entry in the “Die Hard” action franchise.

Mr. Rickman’s pitch-perfect straddling of overconfident intellect and snake-like menace as his character Hans Gruber holds hostages in a Los Angeles office building made him a compelling nemesis for the blue-collar American police detective played by Bruce Willis, whose wit is limited to one-liners such as “Yippee-ki-yay” followed by an expletive.

As he so often did in his career, Mr. Rickman stole the film from the nominal star, winning unanimous critical praise. Not alone in her assessment, New York Times film reviewer Caryn James called him the “film’s best surprise.”

He took his sneering malevolence full throttle in the “Harry Potter” films, based on J.K. Rowling’s popular fantasy books about a schoolboy wizard, that spanned the 2000s.

Mr. Rickman played Professor Severus Snape, a teacher at the wizard academy, with all the outward mannerisms of deviancy — the acid manner, the flaring nostrils, the black pageboy cut — but with such discomforting and enigmatic depth that viewers are left to ponder whether he is Potter’s ally or tormentor or both.

“There was more to him than met the eye,” Mr. Rickman once said of Snape. “It’s something unnameable. He lives within very tight confines emotionally, physically. He lives a solitary kind of existence. Mysterious. He’s very focused. Eventually you get to find out who he is. Innocence. Lost. Resentful. It’s been a complete privilege.”

But portraits of Mr. Rickman as a specialist in villainy dramatically understated his range as a performer.

He was a cellist who returns from the dead to comfort his former lover (Juliet Stevenson) in the romantic fantasy “Truly Madly Deeply” (1990) and was the cruel Sheriff of Nottingham to Kevin Costner’s bland hero in “Robin Hood: Prince of Thieves” (1991). He also played the shifty campaign manager in “Bob Roberts” (1992), an American political satire written by, directed by and starring Tim Robbins as a right-wing millionaire masquerading as a populist.

Primarily a character actor, Mr. Rickman won plaudits as the honorable Col. Brandon in “Sense and Sensibility” (1995) opposite Emma Thompson, Kate Winslet and Hugh Grant, the Irish statesman Eamon de Valera in the IRA biopic “Michael Collins” (1996), starring Liam Neeson as the revolutionary of the title, and a married executive besotted with his secretary in the Christmas crowd-pleaser “Love Actually” (2003).

He also showed up as Ronald Reagan in “Lee Daniels’ The Butler” and the scruffy nightclub impresario Hilly Kristal in “CBGB” (both 2013); the clammy and depraved judge in “Sweeney Todd: The Demon Barber of Fleet Street” (2007), Tim Burton’s version of the dark Stephen Sondheim musical; and a decidedly unappealing angel in “Dogma” (1999), director Kevin Smith’s irreverent comedy about Catholicism.

Mr. Rickman was showered with superlatives for the raw energy he brought to his lead performance in “Rasputin,” a 1996 HBO television movie about the infamous Russian mystic who ingratiates himself with the imperial Romanovs.

While the films and TV work brought Mr. Rickman a vast following, he continued embarking on stage roles that showcased his range and technical prowess. Among his standout performances was Mark Antony to Helen Mirren’s Cleopatra in a 1998 London staging of the Shakespeare tragedy “Antony and Cleopatra” and the title role in Henrik Ibsen’s “John Gabriel Borkman” in a 2010 production in Dublin’s Abbey Theatre.

American audiences, accustomed to his many screen roles of cunning in the service of evil, were pleasantly surprised by his deft comic timing and sophisticated allure in a revival of Noel Coward’s “Private Lives” on Broadway in 2002.

The show, about ex-spouses who encounter each other on their respective honeymoons with new and entirely unworthy mates, was a hit, thanks to the languorous charm he and Lindsay Duncan brought to the leading roles. They won rapturous reviews for the modern erotic bite they gave to a play that dated to 1930.

“There are tasty hints of feminine vanity in him and masculine belligerence in her that make them seem all the better matched,” Times theater critic Ben Brantley wrote. “When they sing snatches of songs to each other, you sense a shared language beyond language.”

Having initially transferred from London, the Coward comedy ran on Broadway for 127 performances and brought Duncan a best actress Tony and earned Mr. Rickman a nomination for best actor in a play. His final Broadway appearance was in 2011 as a haughty creative writing professor in “Seminar,” a comedy by Theresa Rebeck.

Alan Sidney Patrick Rickman was born in London on Feb. 21, 1946, and was the second of four children of parents of Irish and Welsh descent. He was 8 when his father, a painter and decorator, died of cancer. His mother struggled to raise the children.

He inherited from his father a talent for illustration, watercolor painting and calligraphy that helped him attain a private school scholarship at 12. At the Latymer Upper School, in West London, he immersed himself in the arts, including sundry theater roles.

After graduation, he studied at what is now called Chelsea College of Arts, where he met his longtime partner, Rima Horton. They were companions for decades and secretly married within the last few years. He seldom gave interviews, in large part to keep his private life cloistered. Besides his wife, a university lecturer in economics, survivors include three siblings, Viner said.

While an art student, Mr. Rickman began a long stage apprenticeship in London. Soon after his art school graduation in 1968, he entered the Royal Academy of Dramatic Art and supported himself as a freelance designer and as a dresser for actors Nigel Hawthorne and Ralph Richardson.

He completed his RADA courses in 1974, then performed in repertory theater and intermittently worked with the Royal Shakespeare Company. He came to prominence in England for his role in 1982 as the political manipulator and lady killer Obadiah Slope in the BBC-TV production of “The Barchester Chronicles,” adapted from works by Anthony Trollope.

That performance opened the door for many high-profile roles on stage and with the BBC. With his movie-star leverage, he began directing small-scale films. They included “The Winter Guest” (1997), a well-received drama set in Scotland and starring Thompson, and “A Little Chaos” (2014), a costume picture with Winslet and Jeremy Brock and set in King Louis XIV’s palace at Versailles. Mr. Rickman gave himself a supporting role as the charismatic monarch known as the Sun King.

Mr. Rickman, a staunch supporter of the Labor Party, was quietly committed to arts education, philanthropy and political activism. He was vice chairman of RADA and a patron of a research foundation that helps those with cancer and facial disfigurements and of an organization that aids artists reduced to poverty.

His political engagement led him to direct “My Name Is Rachel Corrie,” a show he compiled with journalist Viner from the writings and emails of Corrie, who was killed at 23.

Mr. Rickman befriended the Corrie family and earned their trust, and the show was warmly received in London in 2005. The next year, however, a prominent New York production was postponed reputedly over concerns of possible boycotts and protests from those who viewed it as anti-Israeli agitprop.

Mr. Rickman denounced “censorship born out of fear,” and theater eminences such as Tony Kushner, Harold Pinter and Vanessa Redgrave criticized the decision to indefinitely delay the show. The one-woman play was put on later that year at another theater, to mixed reviews, and has since been staged at venues around the world.

Amid the cause celebre, Mr. Rickman gave a flurry of interviews in which he discussed his career and legacy. Of the “Harry Potter” films, he said: “At this point, it’s good to have done something for children. I like the fact it’s persuaded children to read. If I’m going to be working when I’m 80, I need them as my audience.”