P. G. T. Beauregard
Cocke was eventually assigned to the army of P. G. T. Beauregard in command of the 5th Brigade, consisting of the 8th, 18th, 19th, 28th, and 49th Virginia Infantry regiments. His brigade was initially assigned to Centreville, but in the face of advancing Union forces, withdrew behind Bull Run on July 17.