It just so happen AI will probably be the best weapon to delete mankind as we know it.
The pre programming for the risk of 'AI losing control' has been going on for a long while, everyone has this kind of 'fear' in the back of their brains.
This is a huge card in the future game.
The truth obviously is that AI will never, ever, 'take charge' or acquire a personal identity. It's a bunch of code that replicate results for given stimuli.
What can happen though is that the people behind it all will generate a scenario in which is very easy to think it is exactly what has happened to clean house. Imagine a war against machines which 'lost control', a la terminator, while the people actually in control watch it on their home theater in a bunker.
This, thanks to plausible deniability that will obviously be on par with the lethal tech drones (go demonstrate what really happened) is one of the best cards to play in the near future once the economy goes downhill and social unrest flares up as it will be more complicated to organize to assess the situation.