Pakistani air strikes have killed 31 militants and a suspected US drone strike has killed a further seven, officials say, as local troops pressed on with a six-month offensive in tribal regions along the Afghan border that have long been insurgent havens.

The air strikes late on Saturday in the Tirrah valley of the Khyber region destroyed four militant hideouts and a suicide bomber training centre, said an army statement. The military said several would-be suicide bombers were among the dead, without providing further details.

The military says the operation in Khyber is aimed at militants who have fled a massive offensive in the neighbouring North Waziristan region that was launched on 15 June 2014. The army says the offensive has resulted in the deaths of 1,200 militants.

Last month’s school massacre in Peshawar – in which 150 people were killed, mainly children – is believed to have been launched from Khyber. The attack prompted both Afghanistan and Pakistan to vow tougher action along the porous border.

Two Pakistani intelligence officials said US drone-fired missiles had struck a militant compound in the Datta Khel area of North Waziristan early on Sunday, killing seven militants and wounding four. The compound, around 300 metres from the Afghan border, was used by fighters loyal to the Pakistani Taliban commander Hafiz Gul Bahadur as well as Uzbek militants.

They said Bahadur’s men, who frequently launch attacks in neighbouring Afghanistan, and Uzbek fighters were among those killed in the strike. It was not immediately clear if Bahadur himself was in the compound at the time. The officials spoke on condition of anonymity because they are not authorised to speak to media.

The covert US drone programme has eliminated several top militants but has also resulted in civilian casualties, making it extremely unpopular among Pakistanis, who condemn it as violation of their country’s sovereignty.