ISLAMABAD - Pakistani soldiers killed at least 45 Taliban militants in scattered gunbattles across the northwestern Swat Valley after a suicide bombing on a police station killed 17 cadets, the army said.

Hundreds of miles (kilometres) away, a southwestern border crossing with Afghanistan reopened Monday after an administrative dispute kept it closed for two days. A line of NATO fuel tankers waiting to cross was bombed by militants, killing one driver and destroying 16 trucks.

Taliban militants were suspected in both the police station bombing and the attack on the trucks, which came hours apart.

The insurgents have vowed to avenge the army's recent offensive to retake the Swat Valley and the death of their top leader in a U.S. missile strike near the Afghan border in early August.

Sunday's suicide bombing in Swat was the deadliest attack since the military regained control of the northwestern region in July.

Soldiers looking for militants after the attack encountered resistance in several areas, and battles that raged into early Monday left 30 dead, army spokesman Col. Akhtar Abbas said.

Separate army statements Monday said 15 more militants were killed in security sweeps of five other areas over the previous 24 hours and two soldiers had died.

It was not possible to independently confirm the death toll provided by the army.

The military has said it is restoring security in Swat after its three-month offensive ended the Taliban's rule over many areas there. But suicide attacks and skirmishes continue.

The death toll in Sunday's suicide attack rose to 17 on Monday as one of the wounded died, local hospital official Ikram Khan said. The bomber sneaked into a police courtyard in the valley's main town of Mingora and detonated his explosives next to a group of volunteers training for a community policing force.

The other bomb, near the border crossing, ripped through a line of NATO fuel trucks backed up by a two-day closure resulting from a dispute over fruit inspections. At least one driver was killed and 16 trucks destroyed on the Pakistani side of the Chaman crossing, police official Gul Mohammad said.

Chaman is one of two main crossing points for supplies for American and NATO troops fighting the Taliban in Afghanistan. The foreign troops get about 75 per cent of their supplies through Pakistan.

Pakistani customs officials said their increased and lengthy inspections of Afghan trucks carrying pomegranates and grapes prompted Afghan officials to close the border.

Officials had warned the closure was a security risk because it left nearly 1,000 trucks, many of them carrying supplies to international troops, exposed.