Pakistani security forces raided two hideouts of the Pakistani Taliban near the Afghan border over two days, triggering clashes that the military said killed 12 soldiers and 35 militants.

The military said Saturday that 22 militants were killed in the first operation in Bajaur district of Khyber Pakhtunkhwa and 13 more were killed in a separate raid in South Waziristan, where the 12 soldiers died. In a statement the military said the soldiers, “having fought gallantly, paid the ultimate sacrifice and embraced martyrdom.”

The military described the militants as “Khwarij,” a term used by Islamabad for the Tehrik-e-Taliban Pakistan (TTP), and accused them of operating from Afghan soil. The statement urged the Taliban government in Kabul “to uphold its responsibilities and deny use of its soil for terrorist activities against Pakistan,” but provided no independent evidence of cross-border bases in the announcement.

Pakistan has long accused India of supporting the Pakistani Taliban and separatist insurgents in Balochistan, an allegation New Delhi denies. The military repeated an allegation of Indian backing for the militants in its statement but did not offer supporting proof.

There was no immediate response from the Taliban administration in Kabul or from officials in New Delhi.

The violence reflects a recent resurgence of the TTP, which is distinct from but closely allied with the Afghan Taliban. Many leaders and fighters of the Pakistani Taliban are believed to have found sanctuary across the border after the Afghan Taliban seized power in Kabul in 2021, a shift Islamabad says has emboldened attacks inside Pakistan. Militancy, particularly attacks claimed by the TTP, has risen in Pakistan in recent years, complicating security in the country’s northwest.

The raids took place as Pakistan’s security forces continue a campaign to dismantle militant networks entrenched in rugged border districts that straddle the Durand Line. Bajaur and South Waziristan have been long-running flashpoints for insurgency and military operations dating back more than a decade.

Analysts say operations in those districts are logistically challenging due to difficult terrain and the presence of tribal communities. Past operations have produced varying results, with intermittent periods of relative calm followed by renewed outbreaks of violence.

The military did not release the names of the soldiers killed or provide further detail about the scale or timing of the raids beyond the two-day timeframe. It said the operations were aimed at disrupting militant planning and preventing attacks inside Pakistan.

Independent verification of the casualties and details of the operations was not immediately possible. Local and international monitors have in the past reported that access to conflict zones along the Pakistan-Afghan frontier is restricted, complicating independent reporting and casualty confirmation.

The incidents underline persistent security challenges for Pakistan and add to tensions between Islamabad and Kabul over cross-border militancy. They also come amid broader regional concerns about the spillover of insurgent activity and the difficulty of securing porous, mountainous frontiers that have long sheltered armed groups.

No group immediately claimed responsibility for the attacks that prompted the raids.

(Reporting by The Associated Press; additional reporting by regional correspondents.)