Virginia's independent cities were classified by the Virginia General Assembly in 1871 as cities of the first class and cities of the second class. The Virginia Constitution of 1902 defined first-class cities as those having a population of 10,000 or more based upon the last census enumeration, while second-class cities were those that had a population of fewer than 10,000. Cities which previously had been granted a city charter, but did not have the requisite population, had their status grandfathered in. Second-class cities did not have a court of record and were required to share the cost of that court with their adjacent county and also shared the cost for three constitutional officers of that court — generally, the clerk, commonwealth's attorney and sheriff — and those shared officers stood for election in both the city and the county. At least two constitutional officers — treasurer and commissioner of the revenue — were required to be elected solely by the residents of the city. The distinction between first- and second-class cities was ended with the Virginia Constitution of 1971. But cities that were classified as second-class cities at the time of the adoption of the 1971 Virginia Constitution were authorized to continue sharing their court system and three constitutional officers with the adjacent county. , 14 of Virginia's independent cities retain these features.