I remember a novel years ago (80's) about a British Officer commissioned from the ranks in WW1 And sent to spain for the Nationalist side to Observe and the trouble he had trying to get his observations about the Nazis listened to when he returned as those officers sent to the republican side now thought him a fascist. For the life of me i cannot remember the title. I want to say he was from a Manchester or Liverpool regiment if that rings any bells
There were Brits and Irish in Franco's Spanish Foreign Legion.
The Republican side was a mess, actually anybody from anarchists (Spain had the strongest anarchist movement in the world back then), liberals, Social democrats, Trotzkists and Stalinists (who were actually the smallest of the political groups, but their influence massively increased with Stalin's military aid, so that eventually they took over, leading to a civil war within the civil war). Add to this some regional groups, like the Basques, who were on one hand Catholic-conservative, but didn't agree with Franco's ideas about hispanism.
A good book to read is Orwell's "Homage to Catalonia".
The International Brigades were the most disciplined and effective unit on the side of the Republic, which attracted many foreigners, no matter if they were communists or not (the Anarchists could be suicidically brave, but were extremelly undisciplined). The biggest part of them were German and Italian refugees from their own fascist countries, closely followed by the French. Most of the foreigners were WW1 veterans.
While the international brigades were under the control of the Stalinists, not everybody was a communist. Every recruit had to pass an interview with the paranoid French commander Marty, if one failed the interview one most likely got shot outside as a "spy".
The reason why Stalin was able to muscle in was the refusal of mainly the UK to help the Spanish Republic (which also put pressure on France's socialist government to supply arms and ammunition to the Republicans). When Franco and his generals made their coup, the only effective group stopping them were the anarchists, who recruited mostly from peasants, who came from the rural regions of Southern and Western Spain, where feudal landlords in conjuction with the church and the army treated them like serfs. Franco's policies were essentially to keep the status quo, with the old feudal landlords in place. This led to indisciplined revenge against convents, aristocrats, churches etc., which caused bad press for the Republic.
So, while Franco had the full support from Hitler and Mussolini, the Republic could only get supplies from two countries: Mexico, which obviously couldn't deliver much, and the Soviet Union. Stalin made sure that his aid came with NKWD officers and advisers attached. Some of the advisers were purely military, but the majority set up an NKWD system in Spain, arresting mainly opponents from other leftwing organisations, like the Trotzkist POUM miliria, with which Orwell served.
Stalin could not tolerate any successful Leftwing system besides his own, so other leftwing groups were his prime target.
After he had the Ribbentrop-Molotov agreement signed between German and the Soviet Union, he dropped the Spanish Republic (not without stealing their deposit of gold).
Beevor also wrote a book about the Spanish civil war.