He also changed the (otherwise unfair) constitution that prohibited him from going for reelection, although at that point I believe a referendum would have been a much better solution.
I'm seeing the same taking over court happening in other countries, so I just don't think there's a simple solution that can be applied in all cases.