Independence was granted by the United States in 1847, and Liberia aided Britain in its efforts to end the illegal West African slave trade. Official U.S. diplomatic recognition came in 1862. With the backing of the United States, Liberia kept its independence through the turmoil of the 20th century.