Early quickly reformed the troops at Lynchburg into the Army of the Valley and planned an offensive campaign to take pressure off of Lee. The 45th Virginia was placed in the brigade of their former major, Gabriel Wharton, now a brigadier general. The regiments march with Early down the Valley to Shepherdstown was its first with a unit larger than a brigade, and it crossed the Potomac River on July 5. Four days later, on July 9, Early fought a battle against a hodge-podge force of Union defenders under Lew Wallace at Monocacy Junction, but Wharton's brigade was held in reserve and saw no action.