KABUL, Afghanistan — It was a rare sight, even after 18 years of progress in Afghanistan: more than 700 women from across the country, gathered to send an unequivocal message to the men now negotiating with the Taliban.

We want peace, the women said, but not at the cost of our rights.

The conference in Kabul, six months in the making, represented a watershed moment at a time when Afghans are struggling to comprehend what peace with the Taliban would bring, even as the war with the militant group is as deadly as ever. American diplomats are holding talks with the Taliban in Doha, Qatar, but the Afghan government is not involved.

Several women expressed fears that a peace deal could bring the Taliban back into the government, leaving women and girls vulnerable to a new wave of the sort of edicts that constrained their lives until the group’s overthrow in 2001. Women were routinely beaten for violating Taliban codes.

One woman at the conference, held inside an enormous tent-like structure, spoke sharply to President Ashraf Ghani shortly before he delivered a speech emphasizing his support for women’s rights.