During political upheavals in the mid 19th century, some conservatives invited Maximilian (brother of Kaiser/King Franz Josef of Austria-Hungary) to become Emperor of Mexico. He had some French troops backing him up. Of course you remember that Spain had been ruled by Habsburgs for a while, so you can see the connection.
Anyway, the plan did not stick and Maximilian was executed in 1867 ("ruling" from 1864).