The state of West Virginia was part of Virginia until the American Civil War. Virginia then left (seceded from) the United States and joined the Confederate States of America. The western counties of Virginia seceded from Virginia to form a new state which was loyal to the Union. After the end of the Civil War, Virginia became part of the United States again in 1870, but the counties that had left to start West Virginia did not join Virginia again.