ISLAMABAD, Pakistan — The Taliban announced a temporary cease-fire Tuesday as pressure builds to bring the militants and the Afghan government together for direct peace talks now months overdue.

The Afghan government welcomed the move marking the Muslim holiday of Eid al-Adha and ordered Afghan government forces to respect the truce. But the gestures of goodwill come as violence across the country remains high, despite the signing of a peace deal between the Taliban and the United States in February.

The U.S. special envoy for Afghanistan, Zalmay Khalilzad, returned to the region this month to build momentum for direct talks between the two sides. Under the February accord, talks with the government were set to begin in March.

A controversial prisoner exchange and continued violence quickly emerged as key sticking points. The Afghan government has only recently indicated it may be willing to release the 5,000 prisoners demanded by Taliban leadership as a precondition to talks. And the Taliban has said the group is open to direct talks after the Eid holiday, once the prisoner swap is complete.

The Taliban cease-fire announcement called on the group’s fighters to “halt offensive operations against enemy forces” starting Friday during the three-day holiday. But if government forces attack, the statement said, “they must be met with a strong response.” The statement also said the group’s fighters are not permitted to travel to government-controlled territory.

A cease-fire in 2018 was marked by extraordinary scenes of Taliban and government fighters crossing enemy lines to greet one another. Reports later emerged that the cessation of violence also led to large numbers of defections from the Taliban’s ranks.

Despite brief pauses in fighting, the war in Afghanistan remains one of the world’s deadliest conflicts, according to a United Nations report released this week.

During the first half of this year, more than 1,200 civilians were killed and 2,100 injured. The Taliban and other anti-government militant groups were responsible for most of those casualties, according to the report.

Overall, the numbers mark a decrease in civilian deaths and injuries when compared with the same period last year, but U.S. and Afghan government officials say the levels of violence remain too high. Following the signing of the peace deal with the Taliban, U.S. officials said they expected violence across the country to remain low. A week of reduced violence preceded the signing, prompting many to hope decades of deadly conflict had turned a corner.

But in the months that followed, the “reluctance” on both sides to make concessions to facilitate direct talks suggests that once negotiations begin, they are likely to be a lengthy process, according to Scott Worden, director of the Afghanistan and Central Asia programs at the United States Institute for Peace.

It “shows what difficult compromises may look like during talks,” Worden said. “Each side will have to give a little on core concerns. But much more difficult issues — rights, governance and power-sharing — lie ahead.”

The agreement between the United States and the Taliban does not outline what form of government will rule postwar Afghanistan. Taliban leaders have said they are open to discussing issues of democracy and human rights, but some Afghans fear a power-sharing deal could undermine the country’s fragile democracy.

Several hours before the cease-fire announcement, the Taliban’s leader, Hibatullah Akhundzada, issued a lengthy online statement addressed to “the Muslim Afghan nation,” in which he declared that the insurgents are “on the threshold of establishing an Islamic government” but do not seek a “monopoly over power” and are also looking forward to intra-
Afghan talks.

He called on insurgent fighters to “treat civilians with utmost care” and “consider the protection” of their fellow Afghans, to “give greater attention to obedience” to God and to strengthen their “internal bond and cohesion” in the ranks. These appeals appeared aimed at unifying and cautioning Taliban forces, in which some commanders have insisted on continuing to fight even as Taliban negotiators were discussing terms for peace.

The Afghan government has released more than 4,400 Taliban prisoners, according to the country’s National Security Council. The Taliban says it has released more than 800 members of the Afghan security forces, but the government says the true number is fewer than 600 because many of those released were civilians.

Constable reported from Kabul. Haq Nawaz Khan in Peshawar and Aziz Tassal in Kabul contributed to this report.