Spain and Germany - Alternative WW2
I certainly can't see Germany invading Spain in 1940 - there would be no point. A more likely ATL has Franco joining the Axis as a full partner in July 1940. He believes England will fall and part of his "reward" will be Gibraltar if he signs up with Hitler.
Hitler asks the Spanish to besiege Gibraltar which they do but there is nothing of strategic value left on the rock. The Navy has either returned to home waters or retires to the Eastern Mediterranean under Cunningham after the destruction of the French fleet at Oran in early July.
The Spanish Army is woefully ineffective and Hitler is forced to send Kurt Student and his paratroopers to finish the job. An airborne landing on October 18th 1940 backed up by a ground assault soon forces the British to yield and Gibraltar is occupied.
Portugal declares its neutrality in July 1940 but Hitler becomes concerned at British intentions during 1941. On January 30th 1941, a combined German/Spanish force invades Portugal across the Tagus river. Within ten days, Lisbon has fallen and Portugal is another part of the German Empire.
For Churchill, the German conquest of Iberia has shades of Napoleon about it. After Pearl Harbour, he asks Roosevelt for help in landing a force on the Galician coast. Meanwhile, in both Iberian countries, resistance quickly develops, both Communist (after June 1941) and anti-Communist.
Churchill's strategic interest in Iberia isn't shared by the Americans, who take over from the British in the Canary Islands in 1942 - Britain occupied the Canaries and the Azores in 1940 following the German occupation of Iberia.
Following Eisenhower's landing in Morocco, the local Spanish force is swept aside and the colony breaks with Madrid. The Germans under Rommel fortify both Ceuts and Meillia in response and in early 1943 both cities are ravaged as Rommel organises the last stand of the Afrika Korps there and in Tunis.
On August 15th 1944, American and Free Spanish forces landed south of Barcelona and within days had established a firm bridgehead against weakening Axis forces. At the same time, the resistance in Portugal rose against the occupying German and Spanish forces. With the Americans liberating northern France, the Germans began to withdraw back into France. On September 10th 1944, British and Free Portugese forces liberated Lisbon while four days later, American forces entered Madrid. Franco fled to Germany where he committed suicide in early May 1945. Gibraltar is liberated and returned to British rule.
After the war, both Spain and Portugal returned to more democratic forms of Government. Spain voted for a left-wing Government in the 1945 elections while Portugal was more social-democratic in nature. Both countries joined NATO in 1949 and Spain joined the original seven EU countries in 1957. Portugal joined in 1964 after a Referendum.