KABUL — In Afghanistan's halting effort to end two decades of conflict, recent days have brought a sudden shift: A three-day cease-fire to mark the end of the holy month of Ramadan held for more than a week. The Afghan government and the Taliban released hundreds of prisoners. And the two sides restarted informal negotiations in the capital.

If these conditions persist, officials say, long-awaited peace talks could be mere weeks away. The developments have led many Afghans to ponder — and disagree — over what concessions they’re willing to make to secure a deal that could permanently end 20 years of violence.

How much is too much to give away in exchange for peace?

“It will be a dilemma, a personal dilemma,” said Khalid Noor, a member of the government’s negotiating team. “If we compromise the rights of our people,” he said, an oppressive government could harm Afghanistan for generations to come.

The process for ending the war in Afghanistan was set in motion by a February peace deal between the United States and the Taliban that largely excluded the Afghan government. The resulting four-page public document did not define what kind of country postwar Afghanistan would be. The omission made a deal for the withdrawal of U.S. troops easier to secure, but it also set the stage for much more complex negotiations between the Afghan government and the Taliban.

To reach a political solution, one or both sides will need to make significant compromises.

The Afghan government is a republic with leadership chosen through democratic — if flawed — elections, while the Taliban rules according to Islamic law, and the group’s leadership is chosen by a religious committee. The movement’s military leadership is made up of commanders across Afghanistan, but its political office is based in Qatar.

In Kabul and Doha, each camp has insisted there are no preconditions. But both sides have made their priorities clear: The Afghan government wants the country to remain a republic with regular elections, and the Taliban wants a country governed by Islamic law.

But in Afghan provinces that have borne the brunt of the waves of violence that preceded the cease-fire, many say ending the fighting is more important than the parameters of any future government.

The northern province of Takhar was so badly hit that a local lawmaker, Habiba Danish, described it as “a slaughterhouse” because of the high number of casualties among security forces there.

“Peace should come at any cost,” said Mir Ahmad Qasim, a local lawmaker in Takhar.

People who live in insecure districts view the war differently than officials in the capital, he said. Progress in areas such as human rights, including the rights of women, he said, “are important for the people who have positions in Kabul. But for people who are losing sons in the war, they want the end of violence at any cost.”

After the signing of the U.S.-Taliban peace deal, violence across Afghanistan spiked, leaving record numbers of civilians dead and inflicting heavy casualties among the security forces. A brutal spate of attacks prompted President Ashraf Ghani to put his forces back on the offensive and halt prisoner releases, a key confidence-building measure.

All of that suddenly turned around in late May, when the Taliban declared an unexpected cease-fire to mark the end of Ramadan, and both sides began releasing prisoners again. Over the course of the cease-fire, the Interior Ministry said it observed only minor security incidents. For days after the cease-fire was set to end, violence remained low, with Taliban attacks nearly halved.

Attacks began to tick up again Thursday, with the Taliban claiming an attack in Zabul province that killed at least 10 Afghan police officers, and U.S. forces carrying out two airstrikes targeting the militant group.

Mujib Rahimi, a spokesman for Abdullah Abdullah, the man leading the peace effort with the Taliban, said he understands the concerns of Afghans who have been caught in the crossfire.

“No one is ready to just watch this violence continue,” Rahimi said. But, he said, at the same time, “surrendering to the demands of . . . radicals with radical ideas” just to prevent them from attacking government positions “is something hard to swallow.”

Rahimi said the government negotiating team would enter talks with no red lines but would attempt to convince the other side of the importance of human rights, women’s rights and freedom of expression.

Taliban leaders say they support a government that respects human rights and the rights of women, but Taliban spokesman Suhail Shaheen said such rights are defined by Islamic law and suggested that those definitions would be what the Taliban would support during the talks.

“In the future system, the ulema [Muslim scholars] and experts will discuss and formalize the laws so that no one will be deprived of her or his rights,” he said.

Shaheen said the only issue not up for discussion is that Afghanistan will be ruled by an Islamic government. With regard to all other details and issues, “we are not deciding now,” he said.

Many local leaders, including women and civil society activists, describe feeling torn between the desire to end the bloodshed quickly and giving up what they feel they’ve fought for over nearly two decades.

Rahmatullah Hamnawa, an activist in Kunduz, has advocated for human rights in one of Afghanistan’s most volatile provinces, but he said he still believes “peace should come at any cost” and that both parties to the conflict should “pay the price.”

He said he would not support the government backtracking completely on human rights, but he would be open to allowing the Taliban to amend the constitution.

Qasim, the lawmaker from Takhar, was more absolute.

“The most important thing to our people, whose houses are bombed, wives are widowed and sons are orphaned, is the end of fighting and bloodshed,” he said, “not human rights or women’s rights.”

Haq Nawaz Khan in Peshawar, Pakistan, contributed to this report.