The incidents, in which 12 soldiers also died, highlight the difficulties of containing the resurgence of terrorist groups

Fierce clashes broke out in Pakistan near the border with Afghanistan when Pakistani security forces raided two hideouts of the Pakistani Taliban, killing 12 soldiers and 35 militants, the military said on Saturday.

Twenty-two militants were killed in the first raid in Bajaur, a district in north-western Khyber Pakhtunkhwa province. Thirteen more were killed in a separate operation in South Waziristan district.

The incidents underline the struggles Pakistan faces as it tries to contain the resurgence of militant groups.

The country has faced a rise in attacks in recent years, most claimed by the Pakistani Taliban, also known as Tehrik-e-Taliban Pakistan, or TTP.