 Under the Anaconda Plan, the Union Navy blockaded the principal seaport, Galveston and the entire Gulf and Southern borders, for four years, and federal troops occupied the city for three months in late 1862.Confederate troops under Gen. John B. Magruder recaptured the city on January 1, 1863 and it remained in Confederate hands until the end of the war.A few days later the Confederate raider CSS "Alabama" attacked and sank the USS "Hatteras" in a naval engagement off the coast of Galveston.