The pre-dawn gunbattle happened in South Waziristan, a district in Khyber Pakhtunkhwa province, according to a military statement. It said the slain insurgents were involved in multiple past attacks on security forces.
The military said the officers killed were an army major and a junior officer. It provided no further details.
The Pakistani Taliban are known as Tehrik-e-Taliban Pakistan and are a separate group from the Taliban in neighboring Afghanistan, who took over that country in August. Since then, the TTP has stepped up attacks on security forces in the region and elsewhere.