They had an unplanned stockholders meeting where the then-CEO was voted out and Elop was ushered in. He did a lot of good stuff like clean up five layers of middle management, got rid of build-it-five-times mentality as well as bring Nokia up-to-date with a bunch of modern practices.
But then he made a PUBLIC speech about Symbian being dead and that they would have an amazing Windows phone at the end of the year. This caused the Osborne effect (https://en.wikipedia.org/wiki/Osborne_effect) to just eat up Nokia.
Nokia was ahead of the game in a lot of things, like platform security -- let's not forget the first iOS ran everything as root and had no App store, while Nokia was making secure boot and encrypted applications happen.
Nokia was five or ten years ahead of everyone else in technology (you can look at iOS history and tick off boxes when they catch up to Nokia), but they had massive problems in their company culture. Nokia could not have bet on the N9 because they just didn't have that sort of mentality.