The American Revolution was fought from 1775 to 1783 between the Kingdom of Great Britain and the 13 British colonies in North America that declared independence in 1776 and formed the United States of America. Some of the key early battles included the Battle of Bunker Hill in 1775 where the Americans ran out of gunpowder but inflicted heavy losses on the British, and the evacuation of Boston by the British in 1776. The British then moved their headquarters to New York but were defeated by Washington at the battles of Trenton and Princeton in 1776, boosting American morale. A major turning point was the American victory over British General Burgoyne at Saratoga in 1777, which led France to form an alliance