The above map shows Europe in 1941. Seems the Mediterranean is almost under Axis control. Spain and Turkey are the major neutral nations on each side of the Meditteranean. Map does not show Libya which was under Italian occupation. Egypt was UK. but Germans at one point did get within 60 miles of Alexandria in Egypt which was near the canal.
Back to Spain. Looking at that map you can see Spain provided a large neutral gap or corridor in between the Axis nations. The allies benefitted more from a Neutral Spain then having them in the war. Also, the allies benefited from Spains neutrality when it came to getting intelligence. Spain was full of Spys from both sides.
Again, back to question because of that I do not think they would have gotten Spain involved. Could you imagine if the allies had not maintained control over the Mediterranean. The war could have turned out different. Especially, if the Germans had first secured the mediterranian before attacking the Soviets. Found out the German Navy also wanted more time to build up there navy before the start of the war. What if they had built up there navy before the war started.
Edit: The Spaniards sent troops to the City of Tangiers during the War.
When the rest of Morocco became a French protectorate in 1912, Tangier was granted special status; in 1923 it officially became an international city, governed by an international commission. It remained an international zone until 1956, when it was integrated with the independent kingdom of Morocco.
They say during the war if was full of spies from all sides. UK. found out about the german plan to dump fake UK. currency from there bank in Tangiers.