During the American Civil War, Shreveport was the capital of Louisiana from 1863–1865. The capital moved here after, first, Baton Rouge, and then Opelousas each fell under Union control. The city was a Confederate stronghold throughout the war and was the site of the headquarters of the Trans-Mississippi Department of the Confederate Army. Isolated from events in the east, the Civil War continued in the Trans-Mississippi theater for several weeks after Robert E. Lee's surrender in April 1865, and the Trans-Mississippi was the last Confederate command to surrender, on May 26, 1865. Confederate President Jefferson Davis attempted to flee to Shreveport when he left Richmond but was captured en route in Irwinville, Georgia.