primarily because of growing anger against Parliament's repeated attempts to tax American colonists without their consent. The Americans readied their large militias, but were short of gunpowder and artillery. The British assumed falsely that they could easily suppress Patriot resistance. In 1775 the American Revolutionary War began. In 1776 the Patriots expelled all the royal officials and declared the independence of the United States of America. After capturing a British invasion army in 1777, the new nation formed an alliance with France (and in turn Spain aided France), equalizing the military and naval balance and putting Britain at risk of invasion from France. The British army controlled only a handful of coastal cities in the U.S. 1780–1781 was a low point for Britain. Taxes and deficits were high, government corruption was pervasive, and the war in America was entering its sixth year with no apparent end in sight. The Gordon Riots erupted in London during the spring of 1780, in response to increased concessions to Catholics by Parliament. In October 1781 Lord Cornwallis surrendered his army at Yorktown, Virginia. The Treaty of Paris was signed in 1783, formally terminating the war and recognising the independence of the United States. The peace terms were very generous to the new nation, which London hoped correctly would become a major trading partner. The loss of the Thirteen Colonies, at the time Britain's most populous colonies, marked the transition between the "first" and "second" empires, in which Britain shifted its attention to Asia, the Pacific and later Africa. Adam Smith's Wealth of Nations, published in 1776, had argued that colonies were redundant, and that free trade should replace the old mercantilist policies that had characterised the first period of colonial expansion, dating back to the protectionism of Spain and Portugal. The growth of trade between the newly independent United States and Britain after 1783 confirmed Smith's view that political control was not necessary for economic success. During its first 100 years of operation, the focus of the British East India Company had been trade, not the building of an empire in India. Company interests turned from trade to territory during the 18th century as the Mughal Empire declined in power and the British East India Company struggled with its French counterpart, the La Compagnie française des Indes orientales, during the Carnatic Wars of the 1740s and 1750s. The British, led by Robert Clive, defeated