Prime Minister Nawaz Sharif authorised the air strikes, a source in his office said - a possible sign he was finally giving in to pressure from the military for tougher military action against Pakistani Taliban strongholds.
The government official said: "After restraining the army for three days, the prime minister himself authorised the strikes last night. It was the only option to teach the Taliban a lesson."
Mr Sharif, who came to power last year promising to find a negotiated peace with the Taliban, has been trying to engage the militants in negotiations.
But talks broke down this week when a Taliban wing operating in the Mohmand Pashtun tribal region said it had executed 23 soldiers in revenge for the killing of their fighters by the security forces.
One Pakistani intelligence official said: "At least 40 militants were killed in the precision strikes in the Mir Ali area. Six different locations were bombed."
Another official said training camps run by Uzbek and Turkmen fighters were among the army's targets.
The air strikes could herald a broader military offensive in North Waziristan, a region where many al Qaeda-linked militants are based.
The morning air attacks came just hours after the Pakistani army had said that more than 100 soldiers had been killed by Taliban militants during the last five months - which had been a rare admission of relatively heavy casualties.
In an unusually tough statement, Mr Sharif's spokesman Pervez Rashid said in televised remarks the army was capable of crushing all enemies.
He added: "The prime minister wants to resolve these issues without bloodshed but if the Taliban continue killing people then we will be left with no choice but to keep our citizens safe from terrorism through any means possible."