In the Maryland Campaign, the Army of the Potomac had six corps. These were the I Corps, commanded by Joe Hooker after Irvin McDowell was removed from command, the II Corps, commanded by Edwin Sumner, the V Corps, headed by Fitz-John Porter, the VI Corps, headed by William Franklin, the IX Corps, headed by Ambrose Burnside and formerly the Department of North Carolina, and the XII Corps, headed by Nathaniel Banks until September 12, and given to Joseph K. Mansfield just two days prior to Antietam, where he was killed in action.