Confederate General John D. Imboden's cavalry brigade arrived at Gettysburg on July 3, too late to take part in the battle. Because his cavalry unit was fresh, Lee assigned Imboden the task of escorting and protecting the wagon train of wounded soldiers back to Virginia. Under cover of a heavy rainstorm, Imboden's 2,100 cavalrymen and 23 cannon left the battlefield the afternoon of July 4th. They escorted the long train of wagons and ambulances with the wounded and foodstores over the muddy roads to Williamsport. During the trip the wagon train was attacked by small units of Union cavalry several times. When he arrived at Williamsport on the afternoon of the 5th, he found the Potomac was flooded and could not be crossed. The rest of Lee's army followed on the night of July 4-5, screened by J.E.B. Stuart's Confederate cavalry. The next day, on discovering the Confederates had left the battlefield, the Union army cautiously followed.