Conflicting reports are emerging from what seems to be one of the biggest battles recently on the Afghan border between Pakistan forces and militants.
Pakistani soldiers were sent into North Waziristan in 2003
While an army spokesman said troops had regained complete control after about 50 people were killed, reports from the scene said a stand-off was continuing.
The army said the trouble in North Waziristan began when pro-Taleban militants attacked government posts.
There have been reports that civilians have been fleeing the area.
One local reporter suggested the military may be preparing for a major offensive.
North Waziristan is a closed military zone and so foreign journalists have found it extremely difficult to get reliable information about events there.
The violence began on Saturday morning when a group of more than 100 tribal militants attacked a military post in Mir Ali.
Security forces fought back, killing more than 20 militants.
Soon the clashes spread to Miran Shah, where several hundred militants tried to storm the main headquarters of the paramilitary troops.
The army sent helicopter gunships after tribesmen traded mortar and gunfire with security forces.
The army said about 45 militants and five troops were killed. There were some reports that the death toll was as high as 70.
Clashes reportedly petered out in the early hours of Sunday but later on helicopter gunships pounded mountains to the east of Miran Shah, sending plumes of smoke into the sky, Reuters said.
"Now the writ of the local administration is restored and the said area is under complete command of the security forces" said army spokesman Major General Shaukat Sultan.
He said some residents had been moved to "safer areas" because of the fighting.
Witnesses said hundreds of people lugging bags and bundles of clothes were fleeing the region.
"'We cannot rule out the killing of civilian people because militants have their hideouts in populated areas" he said, although "our operation is very targeted and precise, using radars and latest weapons and equipments".
Taleban and al-Qaeda fighters fled into North Waziristan after the US-led invasion of Afghanistan in 2001.
Tens of thousands of Pakistani troops were sent in 2003 to flush out the militants, but correspondents say this is the fiercest fighting so far.