The American mythology is that George Washington and Marie-Joseph du Motier (Marquis de La Fayette) and the Continental Army defeated Charles Cornwallis (also a Marquess) at Yorktown in October of 1781 and the British immediately surrendered and went home. It’s a nice story but it does not pass the sniff test.
Why would Brittan surrender. Cornwallis’ army was not the only British Army in North America. By some accounts it wasn’t event the most important. Sure, losing to Americans (and French) at Yorktown was an embarrassing but it didn’t force the British out of America. That process was much more complex than one battle and the army that ultimately forced the British withdrawal wasn’t even in Virginia at the time.
We often discount Spain’s role in the American Revolution. After all, like the Soviet Union declaring war on Japan after Hiroshima, it seems to the casual observer like the joined the war after the outcome was already secure. A closer observation tells a very different story.
The American Revolution was only part of a much larger global conflict between England, Prussia, France, Spain, and the Netherlands. The war was fought not just in North America but also in South America, the Caribbean, Europe, India, and Asia. Spain was a huge participant in these conflicts and saw our revolution as an opportunity to weaken the British Empire which had also invaded Guatemala and Nicaragua and was edging in on Spain’s American empire.
For most of the American War of Independence, Spain was an active COVERT player choosing to smuggle money, arms and materiel into the new United States as well as fight the British in other theaters, most notably Central America, New Orleans, Florida, Gibraltar, and India. While Cornwallis was besieged in Yorktown by Washington and Rochambeau, Bernardo de Gálvez led a series of successful offensives against British forts in the Mississippi Valley and forced the British to surrender Baton Rouge, Natchez and Mobile in 1779 then laid siege to Pensacola. These defeats plus a new offensive by Spain against the vital British possessions of Jamacia, Majorca, and Gibraltar forced Brittan to regroup and decide whether the Colonies in North America were as valuable as India and the Caribbean.
Spain won the American Revolution through the projection of power rather than committing troops to the battlefield and it worked. Very similar to how modern superpowers conduct proxy wars today. Losing the battle at Yorktown was a small loss for the massive army and navy of Great Brittan. Having to fight a war on several fronts with France and Spain, including a potential invasion of the homeland, however, was too much.