Although New York State abolished slavery in 1827, complete abolition came only in 1841 when the State of New York abolished the right of non-residents to have slaves in the state for up to nine months. However, the use of slave labor elsewhere for the production of raw materials such as sugar and cotton was essential to the economy of New York both before and after the Civil War. Slaves also cleared forest land for the construction of Broadway and were among the workers that built the wall that Wall Street is named for and helped build the first Trinity Church.