For whatever reason, the Spanish-American War is avoided. (Maybe the USA focuses some imperialistic might somewhere else?) Spain eventually crushes the Cuban revolts and consolidates it's rule over the island, perhaps even making governmental reforms that lets more power into Cuban hands.
With the Phillipines still in Spanish hands into the 20th century, tensions with Japan increase. Instead of going after Russia, Japan decides to expand into the Phillipines, attacking in 1905. It is a war Spain swiftly loses, without much loss. The Phillipines are "sold" to Japan.
Spain decides to increase and modernize it's naval fleet after it's swift loss against Japan. Spain goes to Germany for help in this, who is currently engaged in the battleship-building race with Britain. German advisors help the Spanish upgrade their fleet. By World War 1, Spain has a small, but effective fleet.
World War 1 goes much the same way, with Germany defeated and Austria-Hungary dissolved. Russia plunges into revolution. Hitler and the Nazis come to power in Germany. In Spain, however, the Spanish Civil War was avoided by having a much more effective government. Spain becomes more of a republic, with a figurehead monarch.
For fun, let's have Frano become Prime Minister or President, still with an authoritarian mindset. He slowly takes over the government, kind of how Hitler did, but not to the extent.
On September 1st, 1939, Nazi Germany invades Poland, touching off the Second World War. Hitler attempts to coerce Spain to join, but at first, Franco declines. In December, 1941, the Japanese attack Hawaii, with a much more dedicated force (no Phillipines to attack). The USA enters the war in full bore.
In 1942, Germany and Japan convince Spain to join the Axis, with the promise of the return of the Phillipines at the end of the war. Franco jumps in, reluctantly, and the Germans and the Spanish begin their assault on Gibraltar.
The USA declares war on Spain soon after, and attacks Cuba. The Spanish Fleet, mostly based in Havana and Guantanamo Bay, fights back with dedication. The Americans cannot put force their entire effort while fighting a much more serious war with Japan, so the fleet that fights in the Carribean is a much smaller and older force. The Spanish perform small raids on Miami, Galveston, Mobile and New Orleans.
Eventually, the Spanish are defeated and the Axis crushed. (Perhaps a two-pronged D-Day, one at Gibralter and another at Normandy?)
Just a fairly quick idea. Any comments on plausibility?