Ewell, meanwhile, taking a more easterly route than Longstreet and Hill, on the 27th camped at Carlisle, Early's division of his corps marching to York, and menacing the Pennsylvania capital. General Hooker did not cross the Potomac until the 25th and 26th, and on the 28th General Meade was placed in command of the Federal army.
On the 28th, General Lee learned from a scout that the Federal army was marching to Frederick and was in part located at the base of South mountain, and he changed his design of marching up the valley to Harrisburg and ordered Hill eastward toward Gettysburg. Heth took the lead, and the South Carolinians, with Pender, reached Cashtown, 8 miles from Gettysburg, on the last day of June.
On that day both Meade and Lee were marching unconsciously to the point at which they were to fight the great and decisive battle of the year, if not of the war. It is interesting to note that the Southern general was concentrating from the north and the Northern general from the south. Ewell's corps was approaching the battlefield from Carlisle and York, and Hill's from Chambersburg. Before the close of the day Hill learned that Pettigrew's North Carolinians, of Heth's division, in advance near Gettysburg, had met a strong cavalry force, before which they withdrew without battle.
Early on the morning of July 1st, General Hill pushed Heth's division forward, followed closely by Pender's. With Heth was the Pee Dee artillery, in Pegram's battalion; with Pender, the battalion of McIntosh. About 10 a. m. Heth met Buford's Federal cavalry and drove it back across Willoughby run, where the cavalry was promptly supported by the First corps of Meade's army, three divisions, under General Reynolds. General Hill deployed Heth's division on the right and left of the road, Pender's in support, and the battle became severe.
Pushing his battle forward, Hill was checked at the wooded ridge known as Seminary hill, where the First corps with artillery was strongly posted. Putting his artillery in position Heth gallantly charged the heights with his four brigades, and made so strong a battle that General Howard, with part of the Eleventh corps, reinforced the line of the First. At this juncture Ewell's two divisions came in on Hill's left, and the latter ordered Pender forward to relieve Heth. Ewell's line was at right angles to that of Hill's, and both lines now swept onward with irresistible force. Pender's advance was with Thomas' Georgians on the left of the road, and Lane, Scales and Perrin (McGowan's brigade) on the right. The combined assault of Pender and Ewell's divisions swept the hill and routed the two Federal corps, driving them through the streets, capturing 5,000 prisoners, exclusive of the wounded, several colors and 3 pieces of artillery.