From 1819, some effort was made by the United States Navy to prevent the slave trade. This mostly consisted of patrols of the shores of the Americas and in the mid-Atlantic, the latter being largely unsuccessful due to the difficulty of intercepting ships mid-ocean. As part of the Webster–Ashburton Treaty of 1842, it was agreed that both countries would work together on the abolition of the slave trade, which was deemed piracy, and to continue the blockade of Africa. US Navy involvement continued until the beginning of the US Civil War in 1861; the following year the Lincoln administration gave the UK full authority to intercept US ships. The Royal Navy squadron remained in operation until 1870.