During Bernadotte's time as governor of the Hanseatic cities, the Abdications of Bayonne occurred, an event that triggered the Peninsular War that would play so large a role in Napoleon's defeat. For a time Napoleon considered the notion of placing Bernadotte on the Spanish throne; going so far as to hint at it in a letter to him. However, Bernadotte made it known to Napoleon that he didn't want the Spanish Crown. Joseph Bonaparte, Bernadotte's friend and brother-in-law, was chosen instead. It was not the first, or last time, that Napoleon thought of placing Bernadotte on a foreign throne. Indeed, Napoleon on several occasions, both during his days as First Consul and then as Emperor, thought of naming Bernadotte (Napoleon also considered Murat) as his successor by adoption. Despite their rivalry, Napoleon felt that Bernadotte alone had the popularity, administrative and military skill to safeguard the Empire he had built. However, the birth of the King of Rome put an end to Napoleon's need for an heir. Ironically, Bernadotte did eventually wear a crown, not through the auspices of Napoleon, but as an enemy of France.