ISLAMABAD, Pakistan  Militants attacked a Pakistani Army convoy on Saturday, killing two high-level prisoners and a soldier, the military said, a strike that highlighted the reach that the Taliban still has a month after an offensive began against them.

The prisoners were connected to the militant leadership in the Swat Valley, where the campaign is taking place. They were deputies of Sufi Muhammad, a religious leader with ties to the Taliban whose son-in-law Maulana Fazlullah commands the Taliban in the area.

Mr. Muhammad leads a banned group called Tehrik-i-Nafaz-i-Shariah-Muhammadi, or TNSM, whose stated goal is the implementation of Islamic law and which is closely linked to the Taliban. His deputies who were killed were identified by the military and locals as Muhammad Alam and TNSM’s spokesman, Amir Izat Khan.

A spokesman for Pakistan’s military, Maj. Gen. Athar Abbas, said by telephone that the attack happened at 5 a.m. near an area called Sakha Kot just north of Peshawar, the regional capital. A convoy of about six military vehicles hit a bomb in the road. Soon after, militants started shooting at the convoy, and soldiers returned fire.