Pakistan and Afghanistan's Taliban government have agreed to an immediate ceasefire after more than a week of deadly fighting.

The foreign ministry of Qatar, which mediated talks alongside Turkey, said both sides had agreed to establish mechanisms to consolidate lasting peace and stability.

Zabihullah Mujahid, a spokesman for the Taliban, stated that ending hostile actions was deemed important, while Pakistan's foreign minister described the agreement as the first step in the right direction.

Both parties have claimed to inflict heavy casualties during the clashes, marking some of the worst fighting since the Taliban regained control in 2021.

Longstanding accusations from Islamabad claim that the Taliban harbors armed groups responsible for attacks in Pakistan—a claim the Taliban denies. The recent escalation in violence began when the Taliban alleged that Pakistan conducted attacks on Kabul.

Major fighting along the extensive mountainous border intensified, particularly after rumors suggested Kabul blasts targeted Noor Wali Mehsud, leader of the Pakistan Taliban. In the aftermath, cross-border strikes ensued with Afghan troops firing on Pakistani border posts, prompting Pakistan's retaliation.

According to the UN Assistance Mission in Afghanistan, at least three dozen Afghan civilians have lost their lives, with hundreds more injured.

A temporary truce was briefly established, yet hostilities quickly resumed. Notably, reports emerged on Friday of an airstrike by Pakistan that resulted in multiple casualties, including local cricket players.

The new ceasefire agreement stipulates that the Taliban will not support groups that attack Pakistan, and both parties have committed to refraining from harming each other’s forces, civilians, or critical infrastructure.

Pakistan's Defense Minister Khawaja Asif remarked that the ceasefire should immediately halt terrorism from Afghanistan on Pakistan's soil, with further negotiations scheduled in Istanbul next week.

Despite Pakistan being a historic backer of the Taliban post-2001, relations have soured due to security concerns regarding the sheltering of the Pakistan Taliban within Afghanistan, which has carried out numerous attacks against Pakistani forces.