I would say that the deciding factor was that he made the "right" alliances - for example he was on friendly terms with Nazi Germany, which saved Spain from being invaded by Nazi Germany and also within Spain, he made some associations with some groups that helped him maintain his power.