Given the following passage  "The decolonization of the Americas was the process by which the countries in the Americas gained their independence from European rule. Decolonization began with a series of revolutions in the late 18th and early-to-mid-19th centuries. The Spanish American wars of independence were the numerous wars against Spanish rule in Spanish America that took place during the early 19th century, from 1808 until 1829, directly related to the Napoleonic French invasion of Spain. The conflict started with short-lived governing juntas established in Chuquisaca and Quito opposing the composition of the Supreme Central Junta of Seville.",  answer the following question. Note that the answer is present within the text.  Question: What other threat did the Spanish face at the time of the independence war in the Americas back in the 1800s?
Answer:
Napoleonic French invasion of Spain