P.G.T. Beauregard, commanding the Confederate Army of the Potomac at Manassas, Virginia, requested assistance from Richmond, Virginia (the Confederate capital) to deal with a large advancing Union army, the first invasion of the Confederacy during the Civil War. Union General Robert Patterson had been ordered to prevent Johnston's assistance of Beauregard. He fought several small skirmishes and battles with the Army of the Shenandoah including a fight with Jackson's brigade at the Battle of Hoke's Run. Beginning July 18, Johnston successfully avoided interference from Patterson and moved his troops by railroad to Manassas. The troops arrived in time to support Beauregard in the First Battle of Manassas on July 21. Manassas was the only major action of the Army of the Shenandoah. Soon after the battle, the army was joined with Beauregard's Army of the Potomac under the command of Johnston. Later the combined Army of the Potomac was renamed the Army of Northern Virginia, which was led by Johnston until his wounding at the Battle of Seven Pines after which Robert E. Lee took command.