The blast occurred while the officers were returning after visiting posts along the Pak-Afghan border.
Maj Gen Sanaullah who was the General Officer, Commander Swat Division, along with Lt Col Touseef were killed when the remote-controlled Improvised Explosive Device planted along the road exploded.
They were on their way back after spending a night with troops at a forward post.
The Tehrik-e-Taliban Pakistan claimed responsibility for the blast as spokesman Shahidullah Shahid told journalists, "We are at war with the Pakistan government and we are assessing their sincerity about peace talks. If we find that the government is serious, we can talk. Otherwise we will continue our attacks."
More From This Section
Maj Gen Sanaullah, Lt Col Tauseef, Commanding Officer 33 Baloch Regiment and Lance Naik Irfan Sattar were killed in the blast near Binshai in Upper Dir, the Inter Services Public Relations confirmed.
The killing of the senior officers comes at a time when the country is preparing to hold talks with the militants to put an end to the surging violence, which has so far left over 40,000 people dead including 5,000 security officials.
The incident also comes just a day after the Khyber Pakhtunkhwa government announced gradual withdrawal of troops from Malakand division starting next month.