At least 25 security personnel were killed in a fierce gunbattle that erupted after hundreds of Taliban fighters from Afghanistan crossed into northwest Pakistan and attacked a remote security check post on Wednesday.