At least five Pakistan soldiers were killed when their vehicle was hit by a bomb blast following a clash with militants in southwestern Balochistan province, the military said.
The incident happened Saturday in Kech district of the turbulent province, where the military has been fighting a low-level insurgency for decades.
"Terrorists exploded an Improvised Explosive Device on a security forces' vehicle, which was followed by an intense fire exchange," the military said in a statement. "During the operation, five brave soldiers, having fought gallantly, sacrificed their lives and embraced Shahadat (martyrdom)," it added.
The soldiers were aged between 23 and 25. Nobody immediately claimed responsibility for the attack.
Three militants were also killed in the clash, it said.
A clean-up operation was carried out to eliminate any other militants found in the area, the army said, adding that Pakistan's security forces remain determined to thwart attempts at sabotaging the peace, stability and progress of Balochistan.
The chief minister of Balochistan, Mir Ali Mardan Khan Domki, expressed his regret about the soldiers' deaths.
Some senators are calling for a delay to the elections, scheduled for February 8, citing security challenges.
Balochistan, which borders Afghanistan and Iran, has been the scene of an insurgency by separatists for more than two decades. They initially wanted a share of the province's resources, but later initiated an insurgency for independence.
Separately, in Pakistan's northwestern Khyber Pakhtunkhwa province, the army said security forces killed four suspected militants in operations on Saturday.
Weapons, ammunition and explosives were recovered from the slain men.
The army alleged they were involved in terrorist activities against security forces, as well as extortion and targeted killings of civilians.