Petersburg is an independent city in the Commonwealth of Virginia in the United States. As of the 2020 census, the population was 33,458 with a majority black American population. The Bureau of Economic Analysis combines Petersburg with Dinwiddie County for statistical purposes. The city is 21 miles south of the commonwealth capital city of Richmond.