The troops using artillery and helicopter gun-ships killed at least 50 pro-Taleban militants and lost five of their own men in one of the fiercest clashes so far in a restive tribal region bordering Afghanistan, officials said on Sunday.
The fighting erupted on Saturday afternoon and raged through the night in the towns of Miranshah and Mir Ali in North Waziristan.
An ISPR press release issued in Peshawar said security forces retaliated after militants attacked army and paramilitary camps from three directions with rockets and small and heavy arms.
"The security forces responded effectively and inflicted heavy casualties on them," the statement said, adding the "miscreants" had been evicted from a telephone exchange and other government buildings they had seized on Saturday.
It gave no casualty figures but a senior security official told AFP on condition of anonymity that "at least 50 militants were killed in the retaliatory fire."
Interior Minister Aftab Sherpao said the fighting had ended and telephone communications were being restored. "There is no fighting now and authorities are working to restore the telephone link with Miranshah," Sherpao told AFP.
He said the army used artillery and helicopter gun-ships.
As tension flared in the area hundreds of people were seen leaving Miranshah for safer places, witnesses said.
The fighting left widespread damage with the main telephone exchange in Miranshah damaged along with a bank, a hospital, two hotels, five markets and several houses, an AFP correspondent said.
Top military spokesman Major General Shaukat Sultan said troops were continuing operations against militants. Officials said five soldiers were killed, including two paramilitary troops when militants ambushed their convoy in Mir Ali. Some 14 soldiers were wounded.
The fighting came three days after Pakistani forces said they smashed a suspected al Qaeda training camp in Saidgai village in North Waziristan and killed 40 militants, including foreigners.