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, announced that both sides would work towards establishing mechanisms to ensure lasting peace.

Zabihullah Mujahid, a Taliban spokesman, emphasized the importance of halting hostile actions, while Pakistan's foreign minister labeled the agreement as a first step in the right direction.

Despite both parties claiming to have inflicted heavy casualties during the clashes, this ceasefire represents a significant turn after the worst fighting since the Taliban regained power in 2021.

For years, Islamabad has accused the Taliban of sheltering armed groups that conduct attacks in Pakistan, a claim the Taliban denies. Tensions flared along the lengthy shared border after accusations of Pakistani attacks on Kabul emerged, leading to retaliatory fire from both sides.

A temporary truce had been briefly established during talks in Doha, but cross-border skirmishes continued.

In light of this agreement, the Taliban has committed to refrain from supporting groups conducting attacks against Pakistan, while both parties agreed to avoid targeting each other's security forces and civilians.

Pakistan's Defense Minister expressed optimism, stating that terrorism from Afghanistan would cease promptly, with further talks planned in Istanbul to strengthen relations and address security concerns.