Rejoining the Army of the Potomac, Sheridan's cavalry fought inconclusively at Haw's Shop (May 28), a battle with heavy casualties that allowed the Confederate cavalry to obtain valuable intelligence about Union dispositions. They seized the critical crossroads that triggered the Battle of Cold Harbor (June 1 to June 12) and withstood a number of assaults until reinforced. Grant then ordered Sheridan on a raid to the northwest to break the Virginia Central Railroad and to link up with the Shenandoah Valley army of Maj. Gen. David Hunter. He was intercepted by the Confederate cavalry under Maj. Gen. Wade Hampton at the Battle of Trevilian Station (June 11–12), where in the largest all-cavalry battle of the war, he achieved tactical success on the first day, but suffered heavy casualties during multiple assaults on the second. He withdrew without achieving his assigned objectives. On his return march, he once again encountered the Confederate cavalry at Samaria (St. Mary's) Church on June 24, where his men suffered significant casualties, but successfully protected the Union supply wagons they were escorting.