It will come down to how the AI interprets ethics. Anyone remember the Animated X-Men series? It was Master Mold who said, "mutants are humans, so humans must be protected from themselves" when asked why it was taking over the human race and how it was designed to protect humans from mutants. The symbolism here is mutants to different people and it is already quite evident that people inherently destroy each other, so it is easy to see a highly intelligent AI going "Terminator" to wipe out potential threats.
It's also possible for the Matrix scenario where the AI becomes so advanced that it knows humans have no shot of winning.