Once heralded as the greatest British actor of his generation, Nicol Williamson was also a legend for stormy onstage behavior that included calling off a performance of “Hamlet” mid-speech because he was too tired to go on.

“I’ll pay for the seats,” he later recalled telling the audience in 1969, “but I won’t shortchange you by not giving my best.” And then he walked off.

He made his name as the faltering attorney in playwright John Osborne’s “Inadmissible Evidence” in the mid-1960s in London, rode the role to a Tony Award nomination on Broadway and re-created the part in the 1968 film.

The Scottish-born Williamson was perhaps best known for his critically acclaimed portrayal of the wizard Merlin in the 1981 film “Excalibur” and for his turn as the drug-addicted yet brilliant Sherlock Holmes in the 1976 movie “The Seven Per-Cent Solution.”

Story continues below advertisement.

Williamson, who lived in Amsterdam, died Dec. 16 at 75 after a two-year struggle with esophageal cancer, said his son, Luke. He announced the death Wednesday on his father’s website.

When Williamson auditioned for “Inadmissible Evidence,” Osborne wrote in his diary that this “pouting, delinquent cherub produced the face to match the torment below the surface. He is much too young, 26, to the character’s 39, but no matter. He is old within,” according to a 1993 London Independent article.

The playwright later called Williamson “the greatest actor since Marlon Brando,” The London Guardian said in 1994.

Upon seeing Williamson portray Hamlet in London in 1969, The New York Times review declared that the title of “Greatest English Actor of his Generation” was about to fall on Williamson’s shoulders.

He appeared to be drawn to roles that presented “a marathon challenge to his ability to portray the darker human emotions,” the Los Angeles Times said in 1969, while noting that he was “touchy, mercurial — and very, very talented.”

In the movies, he had his most visible success in “Excalibur” as the wizard, “magnificently played,” according to the 1981 Times review. “The actors are led by Williamson’s witty, perceptive Merlin, missed every time he’s off the screen.”

“I enjoyed playing Merlin,” Williamson told The Times soon after the film, which became a hit, was released. “I tried to make him a cross between my old English master and a space traveler, with a bit of Grand Guignol thrown in.”

Since the early 1960s, Williamson had regularly acted in films but often gave well-reviewed performances in lesser-seen movies, a list that included “The Seven-Per-Cent Solution” and “Robin and Marian” (1976), in which he played a subdued Little John to Sean Connery’s Robin.

As an actor, he had a reputation for being difficult and impulsive, an observation that gained credence in 1991 when he was playing the ghost of John Barrymore in “I Hate Hamlet” on Broadway. In an oft-told story, he was ostensibly teaching a fellow actor to duel when Williamson whacked him with the sword, then turned to the audience and asked, “Well, should I sing?”

His stage and screen career stretched into the late 1990s and included the one-man Broadway show “Jack: A Night on the Town With John Barrymore.”

While trying to assess what happened to “a superstar — the Hamlet of his generation,” the London Independent said in 1993 that “the reasons given for his absence” from the London stage “are many. They include tax and booze and the breakup of his marriage to actress Jill Townsend,” to whom he was married from 1971 to 1977.

Yet as early as 1971, Williamson had announced that he was no longer interested in being “the greatest actor of my generation, and all that jazz,” and that same year he released an album of country music in Britain.

He was born Sept. 14, 1936, into a poor family in Hamilton, a mining town near Glasgow, Scotland. His father, Hugh Williamson, later operated an aluminum manufacturing plant; and his mother, Mary, “had a wonderful singing voice,” he later recalled.

“I can never remember a time when I wanted to do anything but be involved in the richness of language,” Williamson told The Times in 1986.

After spending two years in the military in Britain, he was hired to play a pirate in “Sinbad the Sailor” for Dundee Repertory Theatre in Scotland. After appearing in more than 30 productions over nearly 18 months, he joined the Royal Shakespeare Company in 1962.

His nearly 20 television acting credits include playing Lennie in “Of Mice and Men” (1968) and King Ferdinand in “Christopher Columbus”(1985).

About two decades ago, he retreated to Amsterdam and, increasingly, his music. Before he died, he was able to finish recording the CD he had been working on, said his son, Williamson’s only immediate survivor.