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. The city 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, Danville briefly served as the third and final capital of the Confederacy before its surrender later that year. Danville has maintained an African American majority population since the Reconstruction era. During this time, the city was represented politically by African American members of the Readjuster Party. However, this changed following the Danville Massacre of 1883, after which Democrats regained control both locally and statewide. Decades later, during the civil rights era, Danville again became a flashpoint for racial violence and resistance to desegregation efforts. 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. The population was 42,590 at the 2020 census. It is bounded by Pittsylvania County to the north and Caswell County, North Carolina to the south. It hosts the Danville Otterbots baseball club of the Appalachian League.