The British captured New York City and its strategic harbor in the summer of 1776, which they held for the duration of the war. The Continental Army captured a British army at the Battle of Saratoga in October 1777, and France then entered the war as an ally of the United States, transforming the war into a global conflict. The Royal Navy blockaded ports and captured other cities for brief periods, but they failed to destroy Washington's forces. Britain also attempted to hold the Southern states with the anticipated aid of Loyalists, and the war moved south. British general Charles Cornwallis captured an American army at Charleston, South Carolina in early 1780, but he failed to enlist enough volunteers from Loyalist civilians to take effective control of the territory. Finally, a combined American and French force captured Cornwallis' army at Yorktown in the fall of 1781, effectively ending the war. The Treaty of Paris was signed on September 3, 1783, formally ending the conflict and confirming the new nation's complete separation from the British Empire. The United States took possession of nearly all the territory east of the Mississippi River and south of the Great Lakes, with the British retaining control of northern Canada, and Spain taking Florida.