Spain in 1936 like Libya today?
For Republican Spain to win they would have had to have done it quickly. It is not beyond the bounds of possibility, the events of July 1936 were extremely difficult to predict. Oviedo Seville and Saragossa are all examples of cities which with slightly different turn of events would have been held by the Republic. The communists in 1936 were relatively weak in Spain, so had the uprising been unsuccessful (there is a well established TL around with this scenario) then some sort of Republican government would have endured, though in what form is difficult to predict.
Once the foreign legion were across the straits and advancing towards Madrid then the Republic in its existing form was over and IMHO the only thing that would have stopped a Nationalist victory would have been some substantial changes on the international scene allowing either greater soviet involvement or some greater intervention or support on the Franco-British side. Even then, given the tenacity with which Franco pursued the war, I can't see a solution (ie Republican victory) without a major power being prepared to put troops on the ground although there could have been the Negrin solution, keeping the civil war going until a more general conflict broke out, but even had that happened in OTL, eg perhaps if the Republic hadn't launched The Ebro offensive but instead concentrated on defending Catalonia, can anyone realistically see the Allies doing a lot in Spain in 1939 with the political leadership they had then?
Ironically I think there is a sort of parallel with the existing situation in Libya where the initial rebellion has been sporadically successful, but here the Nato forces are playing the part that the Italians and Germans did in 1936. Before anyone explodes in outrage or accuses me of fascism, the parallels are in no way exact and do not relate to the legitimacy of the regimes, but just to the military and strategic situations.