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, stated both sides have agreed to establish mechanisms to consolidate lasting peace and stability.

Zabihullah Mujahid, a spokesman for the Taliban, noted that ending hostile actions is important, while Pakistan's foreign minister called the agreement the first step in the right direction.

Both groups claim significant casualties occurred during this latest escalation, making it the most intense fighting since the Taliban regained control in 2021.

Islamabad has long accused the Taliban of harboring armed groups that carry out strikes inside Pakistan, a claim the Taliban has consistently denied.

Recent clashes intensified along the 1,600-mile border, following Taliban accusations that Pakistan had launched attacks on Kabul. In retaliation, Afghan forces targeted Pakistani border posts, leading to mortar and drone strikes from Pakistan.

Each side has reported significant civilian casualties, with at least 17 Afghan civilians confirmed dead according to the UN.

A temporary truce declared on Wednesday was undercut by ongoing hostilities. An airstrike from Pakistan reportedly killed eight individuals, including local cricket players, which sparked outrage.

Under the new ceasefire agreement, the Taliban declared they would cease support for groups targeting the Pakistani government, while both sides committed to averting attacks on each other's forces and civilian infrastructures. Pakistan's Defense Minister emphasized the breakthrough as a means to halt terrorism originating from Afghan soil.

Discussions aimed at furthering the ceasefire are scheduled for next week in Istanbul.

The relations between the Taliban and Pakistan, previously allies against shared adversaries, have grown strained since Islamabad accused the Taliban of providing sanctuary to the Pakistani Taliban, who have been waging an insurgency against their government.

}