By sowing enough confusion and getting in front of judges he installed, he in theory had at least a bit of wiggle room to throw it to his 6-3 Supreme Court and to mobilize other GOP leaders in government to back his play to stay in power. I think it was a long shot but not impossible.
knock on wood
I am happy that it did not came (so far) to violence in the streets