Oregon was the 33rd state to join the Union. When it joined in February 1859, a 33rd star had to be added to the flag. This new flag was the nation's official flag when Abraham Lincoln was sworn in as President and it was the flag of the Union when the Southern states started to secede beginning with South Carolina in December 1860. Despite the South's secession, President Lincoln refused to remove stars from the flag as this would have been an admission that the South had the right to do secede. The 33-star flag was in effect from 1859 to 1861.
Although Kansas became the 34th state before the actual breakout of hostilities at Fort Sumter on April 12 to 14, 1861, the flag with a star representing the new state had not become official until July 4, 1861. President Lincoln was the only president to serve under this flag. This flag was in effect from 1861 through July 3, 1863. This date also coincides with the end of the Battle of Gettysburg making this flag the Union flag during that famous battle.
At the start of the Civil War, West Virginia was part of Virginia. The people of this mountainous region were not in agreement with the state seceding from the Union. Delegates from the 26 western counties met and they tried to create a new state. In 1862, the federal Congress approved this new state and on July 4, 1863 a new star was added to the flag to represent West Virginia. This new flag was the flag to which Robert E. Lee surrendered on April 12, 1865 and was the Union's flag when President Lincoln was assassinated on April 15, 1865.
The Western state of Nevada joined the Union on October 31, 1864. This new state was made of territory that belonged to no other state. There was no division in the loyalties within this state such as had been the case with West Virginia. The 36-star flag became official on July 4, 1865 and was the flag of the nation when hostilities ended and the country was once more reunited.