Pakistani soldiers killed at least 30 Taliban militants in overnight gunbattles across the northwestern Swat Valley after a homicide bombing on a police station killed 17 cadets, the military said Monday.

Hundreds of miles away, a southwestern border crossing with Afghanistan reopened after an administrative dispute culminated in an attack on a line of waiting NATO fuel tankers. One driver was killed and 16 trucks destroyed when the fuel caught fire.

Taliban militants were suspected in both blasts, which came hours apart.

The Al Qaeda-linked 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.

Sunday's suicide attack 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 raged overnight into early Monday, army spokesman Col. Akhtar Abbas said.

A separate army statement said one soldier was killed in the fighting in three separate areas of the valley.

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.

The border crossing reopened Monday, he 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 percent 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 that the closure was a security risk because it left nearly 1,000 trucks, many of them carrying supplies to international troops, exposed. The Taliban's Afghan heartland of Kandahar is just across the border.

Customs and security officials from both sides agreed to end their dispute Monday, Mohammad said.