Spain's role in the independence of the United States was part of its dispute over colonial supremacy with the Kingdom of Great Britain. Spain declared war on Britain as an ally of France, itself an ally of the American colonies, and provided supplies and munitions to the American forces.