Elements of the two armies initially collided at Gettysburg on July 1, 1863, as Lee urgently concentrated his forces there, his objective being to engage the Union army and destroy it. Low ridges to the northwest of town were defended initially by a Union cavalry division under Brig. Gen. John Buford, and soon reinforced with two corps of Union infantry. However, two large Confederate corps assaulted them from the northwest and north, collapsing the hastily developed Union lines, sending the defenders retreating through the streets of the town to the hills just to the south.