He served with distinction under Winfield Scott in the Mexican War and from 1851 to 1861 taught at the Virginia Military Institute. He resigned from the army in Feb., 1852. At the beginning of the Civil War, Jackson, practically unknown, was made a colonel of Virginia troops and sent to command at Harpers Ferry. After J. E. Johnston superseded him there in May, 1861, Jackson was given a brigade in Johnston's army and made a Confederate brigadier general. At the first battle of Bull Run, he and his brigade earned their sobriquet by standing (in the words of Gen. Barnard Bee) "like a stone wall."