So as we know, after deposing the Bourbons the Spanish Cortes were eager to elect Leopold of Hohenzollern as king but French opposition to this plan pressed them to elect their second-favorite, Amadeo of Savoy, the Duke of Aosta.
When Amadeo later abdicated in 1873 the Cortes felt they had little choice but to proclaim the Republic. A republic is not such an obvious choice for the 19th century flavor... A decade earlier after a failed reign of an elected monarch, the Greeks voted to choose yet another dynasty than to proclaim the Republic!
What would it take for the Cortes to finally elect Leopold? Externally, France was less of a problem because they were already curbed by Prussia on a war triggered precisely by the Spanish plans to elect a Hohenzollern. Internally, what would one need to do to curb the will of the republican members of parliament?