The area around New York City was the location for multiple battles of the American Revolutionary War, including the largest battle of the war: the Battle of Brooklyn. With victory, the British occupied the city from September 1776 to late 1783. In response to the Crown’s offer of freedom for slaves who left rebel masters, by 1780 the city became crowded with 10,000 blacks, most of whom had escaped slave masters. The British evacuated 3,000 freedmen with their troops in 1783; the Black Loyalists had chosen resettlement in Nova Scotia and other colonies. George Washington was inaugurated as the first President of the United States on April 30, 1789 in front of Federal Hall and the city served as the capital of the United States until 1790. The New York legislature passed a program of gradual emancipation in 1799; finally abolishing all slavery in the state in 1827.