Virginia City is a town in Madison County, Montana, United States, and serves as the county seat of that county. It is located in the southwestern part of the state, in a region historically associated with Montana's early gold mining era.
The town served as the territorial capital of Montana from 1865 to 1875, a decade during which it functioned as the center of government for the Montana Territory. In 1961, the town and the surrounding area were designated a National Historic Landmark District, known as the Virginia City Historic District.
Virginia City had a population of 219 at the 2020 census. Its designation as a National Historic Landmark District reflects its preserved nineteenth-century character and its role in Montana's territorial history.