Lee knew that his Army of Northern Virginia was in a dangerous position between Pope and McClellan, especially if the two were to unite. On July 13, he sent Jackson, with forces eventually totaling 24,000 men, to watch Pope. After an initial sparring action at Cedar Mountain on August 9, Jackson and Pope stood watching each other for nearly a week. Lee, knowing that McClellan was leaving Harrison's Landing, had departed Richmond with the remainder of the Army of Northern Virginia and joined Jackson at Gordonsville. The combined Confederate forces outnumbered Pope's, and Lee resolved to outflank and cut off the Army of Virginia before the whole of McClellan's force could be brought to bear.
A succession of captured orders enabled both Lee and Pope to learn the intentions of the other. Pope ascertained Lee's plan to trap him against the Rappahannock and withdrew to the north bank astride the railroad. Lee, learning that two corps from the Army of the Potomac would join Pope within days, acted quickly and boldly. He sent Jackson off on a wide turning movement through Thoroughfare Gap in the Bull Run Mountains around the northern flank of Pope's army and subsequently followed the same route with the divisions commanded by General Longstreet.
Pope took note of Jackson's move, but first assumed that it was pointed toward the Shenandoah Valley. Then Jackson, covering nearly sixty miles in two days, came in behind Pope at Manassas on August 26, destroyed his supply base there, and slipped away unmolested. Pope marched and countermarched his forces for two days trying to find the elusive Confederates. At the same time the Union commander failed to take Lee's other forces into account. As a result he walked into Lee's trap on the site of the old battlefield of Manassas, or Bull Run. Pope attacked Jackson, posted behind an abandoned railroad embankment, but again the attack consisted of a series of piecemeal frontal assaults which were repulsed with heavy casualties. By then Porter's V Corps from the Army of the Potomac had reached the field and was ordered to attack Jackson's right (south) flank. By this time also, Longstreet's column had burst through Thoroughfare Gap, and deploying on Jackson's right, it blocked Porter's move.
Next day, August 30, Pope renewed his attacks against Jackson, whom he thought to be retreating. Seizing the opportunity to catch the Federal columns in an exposed position, Lee sent Longstreet slashing along the Warrenton turnpike to catch Pope's flank in the air. The Federal army soon retired from the field and Pope led it back to Washington, fighting an enveloping Confederate force at Chantilly on the way.
Lee, by great daring and rapid movement, and by virtue of having the Confederate forces unified under his command, had successfully defeated one formidable Union army in the presence of another even larger one. Halleck, as General in Chief, had not taken the field to co-ordinate Pope and McClellan, and Pope lost the campaign despite the advantage of interior lines