A suicide bomber rammed his explosive-laden car into the checkpoint in the Mir Ali area of Miranshah town, around 360 km from the national capital, The Dawn reported quoting security officials as saying.
"A truck laden with explosives was rammed into the checkpoint when security officials were offering evening prayers," a senior security official said.
As a result, "five soldiers embraced shahadat (martyrdom)," the official added.
"The checkpoint has been completely destroyed and 34 injured security personnel have also been recovered," he said.
Another security official confirmed the toll, adding that out of the 34 injured, 28 were soldiers and six were from the Frontier Corps, the paramilitary group serving in Pakistan's northwest and tribal areas.
Ansarul Mujahideen, a little-known militant group linked to the Tehrik-i-Taliban (TTP) faction, claimed the responsibility hours after the attack.