The practice of slavery in the Canadas ended through case law; having died out in the early 19th century through judicial actions litigated on behalf of slaves seeking manumission. The courts, to varying degrees, rendered slavery unenforceable in both Lower Canada and Nova Scotia. In Lower Canada, for example, after court decisions in the late 1790s, the "slave could not be compelled to serve longer than he would, and ... might leave his master at will." Upper Canada passed the "Act Against Slavery" in 1793, one of the earliest anti-slavery acts in the world. The institution was formally banned throughout most of the British Empire, including the Canadas in 1834, after the passage of the "Slavery Abolition Act 1833" in the British parliament. These measures resulted in a number of Black people (free and slaves) from the United States moving to Canada after the American Revolution, known as the Black Loyalists; and again after the War of 1812, with a number of Black Refugees settling in Canada. During the mid-19th century, British North America served as a terminus for the Underground Railroad, a network of routes used by enslaved African-Americans to escape a slave state.