Williamsburg became the capital of the Virginia colony in 1699, then of the new independent state of Virginia in 1776. In 1780, the capital moved to Richmond.