On the first day of the Battle of Gettysburg, Cemetery Ridge was unoccupied for much of the day until the Union army retreated from its positions north of town, when the divisions of Brig. Gen. John C. Robinson and Maj. Gen. Abner Doubleday from the I Corps were placed on the northern end of the ridge, protecting the left flank of the XI Corps on Cemetery Hill. After the XII Corps arrived, Maj. Gen. John W. Geary's Second Division was sent to the southern end of the ridge near Little Round Top; Brig. Gen. John Buford's cavalry division formed a skirmish line in the fields between Cemetery Ridge and Seminary Ridge. The III Corps arrived about 8 p.m. and replaced Geary's division (which was sent to Culp's Hill); the II Corps arrived about 10:30 p.m. and camped immediately behind the III Corps.