text: Gaines's Mill was the only clear-cut Confederate tactical victory of the Peninsula Campaign. Union casualties from the 34,214 engaged were 6,837 (894 killed, 3,107 wounded, and 2,836 captured or missing). Of the 57,018 Confederates engaged, losses totaled 7,993 (1,483 killed, 6,402 wounded, 108 missing or captured). Since the Confederate assault was conducted against only a small portion of the Union Army (the V Corps, one fifth of the army), the army emerged from the battle in relatively good shape overall. However, although McClellan had already planned to shift his supply base to the James River, his defeat unnerved him and he precipitously decided to abandon his advance on Richmond.
  Union withdrawal
  The night of June 27, McClellan ordered his entire army to withdraw to a secure base at Harrison's Landing on the James River. His actions have puzzled military historians ever since. The Union army was in a good position, having withstood strong Confederate attacks while only deploying one of its five corps in battle. Porter had performed well against heavy odds. Furthermore, McClellan was aware that the War Department had created a new Army of Virginia and ordered it to be sent to the Peninsula to reinforce him. But Lee had unnerved him, and he surrendered the initiative. He sent a telegram to the Secretary of War that included the statement: "If I save this Army now I tell you plainly that I owe no thanks to you or any other persons in Washington—you have done your best to sacrifice this Army." (The military telegraph department chose to omit this sentence from the copy given to the Secretary.)