More than three dozen militants armed with automatic weapons attacked a security check post in Mekhtar area of Loralai district, killing seven soldiers, the official said.
The militants also suffered losses but they escaped, taking the injured and dead with them.
The forces cordoned off the area and started hunt for the terrorists.
It is believed that the rebels wanted to avenge the arrest of one of their commanders nabbed a week ago by the security forces.
Last week, militants ambushed a convoy of forces in Gawadar and killed three FC soldiers.
Nationalists allege that the federal government is depriving the mineral-rich province of its wealth.