The killings happened in the village of Datta Khel in the North Waziristan tribal district, where the military has been mounting an offensive against Islamist militant strongholds since June.
“During a search operation 7 terrorists were killed in Datta Khel. Three soldiers including an officer also embraced martyrdom,” a military statement said on Sunday.
Four soldiers were wounded in an exchange of fire, it added.
A security official confirmed the incident but told AFP that at least 11 soldiers were wounded in the attack.
A separate military statement said Pakistani jets bombed insurgent hideouts in Datta Khel on Sunday, killing 27 militants.
“In precise aerial strikes, 27 terrorists including some of their important commanders and foreigners were killed in Datta Khel,” it said.
Security officials have described the village as a stronghold of Taliban militants and other insurgent groups.
It is 40 kilometres (25 miles) west of Miranshah, the main town in North Waziristan.
It was not possible to independently verify the casualties as the offensive is ongoing and media are banned from the area.
Pakistani jets and artillery began hitting rebel targets in North Waziristan in mid-June and ground forces moved in on June 30.
The military says nearly 1,500 militants and 124 soldiers have been killed.