Umberto Eco in 2010. (Luca Bruno/AP)

Umberto Eco, an Italian writer and scholar who was best known for his medieval murder mystery, “The Name of the Rose,” which became an unexpected global bestseller in the early 1980s, and who wrote other popular — and intellectually challenging — novels, academic studies and essay collections, died Feb. 19 at his home in Milan. He was 84.

The cause was cancer, his family told Italian media sources.

For most of his life, Mr. Eco was a scholar of wide-ranging interests, specializing in the academic field of semiotics, or the study of signs, symbols and hidden messages. He also had a long fascination with the Middle Ages, monastic traditions, languages and all manner of arcane knowledge.

A professor at Italian universities, Mr. Eco had been at the heart of an avant-garde group of experimental writers, artists and musicians since the early 1960s. He published many well-received academic studies on aesthetics and literary criticism and, as a prolific essayist for newspapers and magazines, was one of Italy’s most prominent public intellectuals.

Almost by accident, he became one of the world’s best-selling novelists, as well.

Italian writer Umberto Eco in 2011. (Giuseppe Cacace/AFP/Getty Images)

In the late 1970s, a publisher asked Mr. Eco whether he was interested in writing a short detective novel. He said no.

“But if I ever did write one,” he recalled to the Paris Review in 2008, “it would be a five-hundred-page book with medieval monks as characters. That day, returning home, I began making a list of names of fictional medieval monks. Later the image of a poisoned monk suddenly emerged in my mind. It all started from there, from that one image. It became an irresistible urge.”

The resulting book, “The Name of the Rose,” was published in Italian in 1980, in English three years later and became an irresistible publishing force. No one was more surprised than Mr. Eco.

Purporting to be a lost manuscript written in Latin that had been rediscovered in modern times, “The Name of the Rose” was set in a 14th-century monastery where monks kept turning up dead. The story is told by an aging priest who, in his youth, was the assistant to a monk named William of Baskerville, who uses Sherlockian powers of deduction to solve the murders.

To that simple plot line, Mr. Eco attached a labyrinthine series of deceptions, cabals and occult mysteries, including a lost work of Aristotle thought to be inspired by the Devil.

“Number symbolism, alchemical secrets, the language of gems, pagan love charms, a linguistic Quasimodo, and the clockwork of a life ordered by the Benedictine rule further enhance the supernatural atmosphere,” Washington Post critic Michael Dirda wrote in 1983. The result, he added, was “an alchemical marriage of murder mystery and Christian mystery.”

With untranslated passages from Latin and descriptions of life inside a medieval monastery, “The Name of the Rose” was not an easy read, yet it became an international sensation, selling tens of millions of copies in more than 40 languages. It was made into a 1986 film starring Sean Connery.

Mr. Eco’s second novel, “Foucault’s Pendulum” (published in Italian in 1988) was even more complicated, featuring a three publishing-house employees who concoct an imaginary plot that spirals into dangerous modern-day encounters with the Knights Templar, a medieval Christian sect with overtones of the occult. The novel ranged from Stonehenge to Disney World to Karl Marx.

The reviews tended to be harsh, with novelist Salman Rushdie pronouncing it “humorless, devoid of character, entirely free of anything resembling a credible spoken word, and mind-numbingly full of gobbledygook of all sorts.”

Critic Herbert Mitgang wrote in the New York Times, “The truest and shortest sentence in the novel reads: ‘I digress.’ ”

Nevertheless, “Foucault’s Pendulum” was another runaway bestseller. In later novels, Mr. Eco explored a castaway’s survival after a 17th-century shipwreck (“The Island of the Day Before,” 1994); medieval religious disputes (“Baudolino,” 2000); a book dealer who remembers everything he has read but can’t recognize his own family (“The Mysterious Flame of Queen Loana,” 2004); and the roots of anti-Semitism (“The Prague Cemetery,” 2010).

His final novel, “Numero Zero,” published in 2015, proposed the notion that Italian dictator Benito Mussolini survived World War II and lived for many years afterward.

For Mr. Eco, the novels were an extension of his philosophical work, only in another guise.

“The detective novel,” he said, “asks the central question of philosophy — whodunit?”

Umberto Eco was born Jan. 5, 1932, in Alessandria, a small city in northwestern Italy. His father was an accountant.

The family name was reputedly bestowed by a public official on Mr. Eco’s grandfather, a foundling, and was derived from the Latin phrase “ex caelis oblatus,” or “a gift from the heavens.”

Mr. Eco’s grandfather was a typographer who passed along a large collection of books that his grandson became immersed in at an early age. Partly in homage to his grandfather, Mr. Eco named many of his characters after type fonts, such as Baskerville, Garamond, Palatino and Bodoni.

Mr. Eco graduated from the University of Turin in 1954, then worked for the Italian state television network for five years and later as an editor for a Milan publishing company, developing a strong interest in mass media and popular entertainment.

At the same time, he began teaching in colleges and publishing scholarly works. He often lectured at universities in the United States and Britain.

In 1971, he became the first professor of semiotics at the University of Bologna, which was founded in 1088.

He also lived in Milan and Paris and was known for his love of fine food and drink. Yet, even after finding success as a novelist, he continued to publish scholarly books and essays throughout his life. He retired from teaching in 2008.

Survivors include his wife of 53 years, Renate Ramge Eco, and two children.

Mr. Eco had a private library of 50,000 books and near-total recall of their contents. He could deliver learned lectures in seven languages, including Latin and classical Greek. Yet he also had a hearty appreciation of pop culture, including cartoons, movies, advertising and the television show “Starsky & Hutch.”

“Pop songs and comic strips were considered trash, but they could also be masterpieces — like Peanuts,” Mr. Eco said in 2002. “I’m not . . . saying there’s no difference between Homer and Walt Disney. But Mickey Mouse can be perfect in the sense that a Japanese haiku is.”