Danville is an independent city in the Commonwealth of Virginia in the United States. The city is located in the Southside Virginia region and on the fall line of the Dan River. It was a center of tobacco production and was an area of Confederate activity during the American Civil War, due to its strategic location on the Richmond and Danville Railroad. In April 1865 it briefly served as the third and final capital of the Confederacy before its surrender later that year. Danville is the principal city of the Danville, Virginia Micropolitan Statistical Area. The Bureau of Economic Analysis combines the city of Danville with surrounding Pittsylvania County for statistical purposes. As of the 2020 census, the population was 42,590. It is bounded by Pittsylvania County and Caswell County, North Carolina to the south. It hosts the Danville Otterbots baseball club of the Appalachian League. Danville has an African American majority since the Reconstruction era and had African American political representatives of the Readjuster Party until after the Danville Massacre and Democrats regaining control locally and statewide. The area again saw violence during the civil rights era.