Maj. Gen. Waheed Arshad said the militants were killed during an ongoing army operation in the Swat Valley, near the country's border with Afghanistan.
He said most of the valley had been cleared of extremists, and that the military had retaken control of many areas.
The official also said that foreign Islamic militants were among those killed, and that a large amount of weapons and ammunition had been seized.
He did not say what losses the government forces had sustained in the operation.
However, national media cited another army official as saying that 20 civilians had died in the violence and that 90 militants had been arrested.
The operation in the Swat Valley started in October, when the Pakistani authorities deployed 2,500 troops there in order to stabilize the situation in the area, which had seen an upturn in Islamic militant activity.