Why was Spain going to war with France important?

A- Spain lost the war and had to give up the colonies.

B- Spain could no longer trade with the colonies.

C- France took over Spain and made the Spanish colonies more angry.

D- France got rid of Spain's leader and gave the colonies to Mexico.