As Lee advanced on Pope with the remainder of his army, Jackson swung around to the north and captured Pope's main supply base at Manassas Station. Confused and unable to locate the main Confederate force, Pope walked into a trap in the Second Battle of Bull Run. His men withstood a combined attack by Jackson and Lee on August 29, 1862, but on the following day Maj. Gen. James Longstreet launched a surprise flanking attack and the Union Army was soundly defeated and forced to retreat. Pope compounded his unpopularity with the Army by blaming his defeat on disobedience by Maj. Gen. Fitz John Porter, who was found guilty by court-martial and disgraced.