Kurt Westergaard, a Danish cartoonist whose caricature of the prophet Muhammad wearing a turban with a fuse-lit bomb incensed Muslims around the world, provoked a free-speech debate and sparked violent attacks and riots that left dozens dead, died July 14 at 86.

His wife, Gitte, announced the death to the Danish newspaper Berlingske without specifying a cause or, for reasons of family security, where he died. Since the publication of his caricature of Islam’s revered founder was printed in 2005, the cartoonist had spent most of his life under police protection.

Mr. Westergaard received countless death threats and, in 2010, narrowly avoided an attack at his home in Aarhus — Denmark’s second-largest city — by a Somali Muslim immigrant wielding an ax and knife. He escaped with his 5-year-old granddaughter, Stephanie, into a “panic room” while police shot the assailant, who was later sentenced to nine years in prison for attempted murder and terrorism.

Mr. Westergaard, a teacher by training who took up professional cartoon-drawing in middle age, was 70 and little known even nationally in Denmark when his editor at the regional conservative daily Jyllands-Posten (Jutland Post) asked 12 Danish cartoonists each to provide a work relating to Islamic extremism.

Mr. Westergaard always insisted that his caption-less caricature of a bearded man with a bomb-like turban was not meant specifically to portray the Muslim prophet. But the newspaper published the 12 cartoons under the heading “The Faces of Muhammad,” and the images became an Internet sensation.

Mr. Westergaard’s cartoon, and reaction to it, became a worldwide focal point for the right of free speech and freedom of the press. Many Muslims strongly believe their prophet should never be represented in images, only through their holy scripture, the Koran. In 2006, Danish embassies in Europe, Africa and the Middle East became the targets of extremist violence that left many casualties.

By 2015, religious tensions in Denmark itself had eased, though not subsided, but they were about to spread elsewhere.

On Jan. 7 of that year, two Islamic extremists attacked the Paris offices of the French satirical magazine Charlie Hebdo, which had republished Mr. Westergaard’s caricature along with new cartoons of Muhammad. Firing their AK-47 rifles as they entered, the gunmen killed 12 magazine staffers, including four cartoonists and two police officers, and wounded a dozen more.

The two men escaped but were killed in a shootout with police two days later. Just before that shootout, another Islamic extremist who had cooperated with them stormed a kosher supermarket on the outskirts of the French capital, executing four hostages before being shot dead by police. The killings plunged the French government into a domestic and foreign policy crisis.

Mr. Westergaard was shocked by how a cartoon in a regional Danish newspaper had taken on a life of its own — and caused so many deaths — but for the rest of his life, he stood by the right to publish it.

Friends said he had long satirized religious figures of all faiths. “He has drawn Ayatollah Khomeini [Iran’s former leader] in the same way,” visual artist Erik Petri told the Danish daily Politiken. “And if Kurt had lived 200 years earlier, his drawings would have been about the Catholic church.”

Mr. Westergaard remained defiant in his public appearances in Aarhus, always flamboyantly dressed in bright yellow or red jackets and pants, colorful scarves and usually with a Panama hat or French beret.

Kurt Vestergaard (he changed the V to a W later in life) was born July 13, 1935, in the village of Dostrup in the Jutland region of southern Denmark, to a strict and conservative Christian family belonging to the Inner Mission Lutheran group.

As a young man, he encountered the Cultural Radicalism movement that criticized fundamentalist religion and traditional sexual morality. Traditionalists saw the movement’s followers as something of a liberal intellectual elite, but as a young man, Mr. Westergaard said, he found “an epiphany, a liberation from religious subjugation.”

After attending the Ranum Seminarium, a teacher’s training college in the Danish town of Ranum, he studied psychology at the University of Copenhagen and eventually became principal of a school for disabled children on the Djursland peninsula in the Kattegat sea.

Encouraged by friends who admired his drawings, he got a job with Jyllands-Posten in 1983. Under the influence of Cultural Radicalism, his cartoons and caricatures often satirized what he saw as the quirks or inconsistencies of every religion.

“He was an easygoing, sociable and fast cartoonist,” Danish journalist David Trads, who worked with Mr. Westergaard during the 1990s, told Politiken. “As well as the flamboyant clothes, he had red hair and a big wild beard so he was a physical presence. He was open-minded, a searcher, and he tried to meet those who were really after him. . . . He believed everyone should be allowed to say and draw what they want.”

In addition to his second wife, Gitte, survivors include five children from their previous marriages; and 10 grandchildren.

In an editorial on July 19, Jyllands-Posten wrote that, after Mr. Westergaard’s death, “it is more important than ever to emphasize that the struggle for freedom of expression, which became his destiny, is the struggle of all of us for freedom.”

It was notable, however, that neither his old newspaper nor any other (at the time of writing this article), republished his most famous cartoon after his death. That fact, Politiken cartoonist Thomas Thorhauge told his newspaper, “shows that the conflict is still unresolved.

“The debate has for the past 15 years destroyed a sea of ​​dinner parties in Denmark,” he continued. “We’re all tired of it, but we can’t bury it. I have no relationship with Muhammad, but it is intolerable for me as a human being, and doing drawings in the free world, that there is a motif I am not allowed to draw. It’s crazy.”