Eight killed as militants clash with Pakistani troops