KHAR , Pakistan - Dozens of militants armed with assault rifles attacked a security checkpoint in Pakistan 's volatile northwest , sparking a gunbattle that left 30 insurgents and one soldier dead , officials said Thursday .