Pakistani security forces were raiding suspected hideouts in the town of Mir Ali in North Waziristan when four soldiers were killed "during an intense exchange of fire".
Four soldiers and two militants have been killed in a firefight with the Pakistani Taliban in the deadliest confrontation between the militants and security forces since a truce was called off earlier this month.
Pakistani security forces raided two militant hideouts in a former Taliban stronghold near Afghanistan when four soldiers were killed, an army statement said on Friday.
The deaths occurred "during an intense exchange of fire", and one "terrorist" was apprehended with weapons and ammunition, the statement added.
The first raid was carried our in the Tank district in the northwest, killing two militants, and the other was carried out in the North Waziristan district, where a militant was captured and four soldiers died.
The military said troops seized a cache of weapons during both raids, but provided no further details about the slain soldiers and detained militants.
Tehrik-i-Taliban Pakistan (TTP), and Islamabad agreed to a truce in November.
Pakistan's restive border region has long been a stronghold for groups such as the TTP, which operates across the porous boundary with Afghanistan.
North Waziristan served as a militant stronghold for decades. The military carried out a full-fledged offensive in the region after an army-run school was attacked in December 2014 in the Peshawar city.
The attack, claimed by Pakistani Taliban, killed 147 people, mostly schoolchildren.
The latest violence in the northwest comes a day after a roadside bomb exploded outside a college in southwestern city of Quetta, killing six people and wounding at least 13 others.