KABUL — In a fractious society where public figures wear ethnic, religious and ideological labels for life, Wahid Mozhdah did not neatly fit any of them. In a dangerous capital where powerful people travel in bulletproof SUVs, the well-known writer and political analyst walked alone to his neighborhood mosque and shops.

During four decades of Afghan conflicts, Mozhdah shifted among various factions but avoided picking up a gun. In the early 1990s, he published several books of poetry he had written during the anti-Soviet jihad; later he penned contracts for the Taliban regime. In recent years, amid the din of political brawls and a brutal civil war, he was known as a thoughtful independent commentator who never raised his voice.

So when the white-haired 66-year-old was shot dead by mysterious gunmen on a motorbike while he walked home from afternoon prayers on Nov. 20, the shock here was widespread and the chilling effect instant.

Even in a capital long inured to insurgent bombings and armed attacks, the precisely targeted slaying of Mozhdah was highly unusual.

Prominent figures of all backgrounds gathered for a tense mourning ceremony two days later. Journalists and scholars praised Mozhdah as a probing intellectual. Taliban officials called his death a “great loss” orchestrated by “the enemies of Afghanistan.” The government’s chief executive officer, Abdullah Abdullah, rushed to Mozhdah’s home. Police visited his family and promised to investigate.

And almost immediately, the rumors began. On social media and in the press, people pointed to the unsolved slaying as part of an effort by powerful groups to stifle dissent. Those groups were said to be singling out individuals who had once been affiliated with the Taliban or had been working privately to build bridges with insurgent leaders and revive stalemated U.S.-Afghan peace talks in Qatar.

The Taliban regrouped as an aggressive insurgency after its regime was toppled in 2001, and it has been battling Afghan government forces ever since. It now controls or contests nearly half of Afghan territory, and it has waged a relentless campaign of violence that has killed tens of thousands of Afghan troops and civilians.

Mozhdah, who once worked at the Taliban’s foreign ministry, was one of a handful of Afghans from that government who continued living openly in Kabul after the Islamist regime fell. He stayed in touch with some of them, including Nazar Mohammed Mutmaen, 46, a former provincial official under the Taliban, and Hassan Haqyar, a former Taliban mining official. Over the past several years, these men and other associates traveled to Qatar to meet with Taliban political leaders.

In late October, Haqyar was shot and wounded by unknown gunmen, according to Afghan media reports. Shortly after Mozh­dah was killed, Mutmaen said he too was attacked but escaped unharmed. He spoke at Mozhdah’s funeral but then fled the country for Turkey. In a telephone interview this week from Istanbul, he said he had been arrested several times and had received anonymous warnings to stop his political activities.

“We are no threat to anyone. We are working for peace,” Mutmaen said. “I was getting unknown calls and messages asking if I was working for the Taliban. They want to pressure us, to silence us.” Mutmaen called Mozh­dah “a brave man who loved his country. I pray for him every day.”

No group has asserted responsibility for the killing, and no suspects have been named. Afghan officials did not respond to requests by The Washington Post for comment or information. The Kabul police referred all queries to the Interior Ministry spokesman, who was not available to meet and did not respond to messages. Sediq Sediqqi, the chief spokesman for President Ashraf Ghani, said he would try to seek assistance from the Interior Ministry but then could not be reached.

Several people close to Mozhdah said both his sympathetic relations with the Taliban and his growing role in efforts by regional powers to influence the peace process may have provoked anger and suspicion. He attended several peace-related conferences in Moscow.

“I worried about the positions he took,” said Abdul Hadi Arghandiwal, a former economy minister who was a classmate of Mozhdah at Kabul University and called him a “knowledgeable and sincere” person. “Unfortunately, for many Afghans who have suffered greatly under the Taliban, to hear someone defend them may be intolerable.”

A number of political observers said they believed that Mozhdah had been targeted for his outspoken views as part of a campaign by powerful pro-government groups to stifle dissent, and they criticized Ghani’s government for failing to protect him and others. Several major Afghan news outlets reported that Mozhdah had been arrested at least once.

“Everyone has to be cautious now,” said Abdul Hakim Mujahid, a former Taliban ambassador who is a member of the government’s High Peace Council. “There are certain centers of power that cannot tolerate open expression.” Mozhdah, he said, was “outspoken but not an extremist. He criticized the government and the Taliban, too. His death has affected a lot of people.”

Mozhdah was never a member of the Taliban religious militia, but he was a strict Sunni Muslim who lived an austere family life in Kabul. His two children graduated from the prestigious American University of Afghanistan.

At the family’s home this week, his son Ahmad Jahid, 28, was downcast but spoke movingly of his father, saying he loved learning and often spoke about wanting peace to come.

“He was always bringing people home, and he was never afraid. We cannot think of anyone who would want to kill him,” Jahid said. “He loved his country, and he had a lot of dreams.”

One of the family’s cherished possessions is a slim volume of poems Mozhdah wrote years ago, when he was a member of the anti-Soviet mujahideen. The cover is a painting of militiamen shooting at tanks. The poems express a mix of religious conviction and wartime bravado.

“We are not afraid to be imprisoned . . . I am not afraid to sacrifice my life,” reads one in Afghan Dari. “God has put us on this path . . . If we hold the torch of the Koran in our hands, we need never be afraid to resist.”

Correction: An earlier version of this article misidentified a man who said he had been attacked and fled Afghanistan. His name is Nazar Mohammed Mutmaen, not Abdul Shukoor Mutmaen, and he was a provincial official under the Taliban, not a former Olympic committee head.