The Siege of Port Hudson was the Louisiana siege that ended on July 9, 1863, giving the Union control of the Mississippi River.
Port Hudson was a heavily fortified Confederate position on the east bank of the Mississippi River, north of Baton Rouge. In May 1863, Union Major General Nathaniel P. Banks began operations against the stronghold while Ulysses S. Grant's army besieged Vicksburg farther upriver. Capturing both positions would split the Confederacy and secure the river for Union transport.
After Union assaults failed to break the defenses, Banks settled into a 48-day siege—the longest in U.S. military history up to that time. The garrison, commanded by Confederate Major General Franklin Gardner, endured shortages, disease, bombardment, and repeated pressure from the surrounding Union army.
Vicksburg surrendered on July 4, 1863, making Port Hudson's position untenable. Gardner surrendered five days later, on July 9. Together, the two capitulations gave the Union complete control of the Mississippi River, severing Confederate communication between its eastern and western territories. Port Hudson is often confused with Vicksburg, but the question's Louisiana location and July 9 date identify Port Hudson.