"...the announcement of the match between Napoleon IV and Infanta Maria del Pilar de Borbon in Paris - with the betrothed couple, her not even yet seventeen, announcing from the steps of the Tuileries their marriage to occur on her 18th birthday in a year's time [1] - was well received across France and indeed much of Europe, settling a domestic concern between Bonapartists and Legitimists by uniting the Bonaparte and Bourbon houses, the new France and the old, and leaving only the fairly miniscule Orleanist faction fuming. In Spain, however, Leopold took the news extremely poorly, for the future Empress's brother was the legitimate Bourbon pretender to his own throne. While Isabella had been unpopular and the Carlists a relatively minor nuisance outside of restive, non-Castilian speaking provinces, Infante Alfonso still had friends at court and was well known to desire a throne of his own, and now had France, a resurgent continental power, tacitly aligned with his claims via his sister's betrothal. At a meeting of the military general staff presided over by Serrano, General Weyler - the hero of the Carlist War - brusquely suggested eliminating yet another threat to Leopold's crown by having Alfonso assassinated the next time the pretender left France. It is rumored that this was the suggestion that got the famously gruff and hard-headed Weyler "exiled" to the Captaincy-General of the Canary Islands and later the Governor-General of the Philippines, where he would not cause political trouble by making such outlandish suggestions [2].
Though there was never any serious consideration of France backing Alfonso's claims with anything other than lip service, of course - Napoleon IV's ambitions lay beyond Europe and he aggressively curtailed the efforts of his ministers who sought confrontations with other continental powers, particularly Germany, and deployed diplomacy to rebuild France's stature at the table of Great Powers - fear of a French-backed Bourbon Restoration permeated Madrid's long-term thinking for decades thereafter, but never more fervently than in the years immediately before and after Napoleon IV's marriage to Maria del Pilar and the continued friendship between the exiled queen Isabella and the Dowager Empress Eugenie, who held considerable sway with her young and impressionable son. Leopold even told his son Wilhelm - who had yet to start going by his Spanish cognate Guillermo [3] - that he was pondering sending him to Germany along with Admiral Topete to negotiate a formal alliance with the German-Italian bloc [4] (a deliberation that when revealed would soon trigger a miniature constitutional and diplomatic crisis), and the fortificado program in the Pyrenees was intensified [5], as was naval spending and modernization, with Spanish shipyards filled to the brim by the early 1880s with orders for new, more modern vessels to counter the growing and burgeoning Marine Imperiale in the Mediterranean [6]..."
- The German on the Spanish Throne: The Reign of Leopold I
[1] Literally three days after Napoleon IV died in the Anglo-Zulu War in OTL
[2] Old Val seems to me like exactly the kind of guy who'd throw out ideas like this
[3] I just don't feel that "Guillermo" has the same royal sound as William or Wilhelm do. Since its such a definitively Germanic name, it doesn't quite have that same cachet in Romance languages. I might even have him take a different regnal name when Leopold (eventually) passes on, that's how much I don't like the idea of a Guillermo I of Spain haha
[4] I haven't gone this route yet because I feel it's a bit overdone with Leopold of Spain TLs
[5] The Pyrenees would be a nightmare for an invading army to try to cross already, and Spain's geography lends itself well to defenders (hence the difficulty of rooting out insurgencies throughout its history, including the Carlists in OTL and TTL). This program would make Spain virtually impossible to invade effectively overland from the east.
[6] Spain strikes me as an oceangoing nation with the domestic capacity to build a substantial naval heavy industry and not have to rely on British shipyards for vessels, it seems they were that way already OTL and obviously a more stable Spain that has a secure Caribbean presence, been through a debilitating civil war in the 1870s and multiple governments would continue on her path of naval investments...