Gen. Joseph E. Johnston withdrew his army from the Virginia Peninsula toward the Confederate capital of Richmond as Maj. Gen. George B. McClellan's army pursued him. By the end of May, Johnston held a defensive position seven miles east of the city on the Richmond and York River Railroad. McClellan's army facing Johnston straddled the Chickahominy River and stretched south. Capturing the initiative from his Union foe, Johnston attempted to overwhelm two Federal corps isolated south of the river. The Confederate assaults, though not well coordinated, succeeded in driving back the Fourth Corps under Brig. Gen. Erasmus Keyes and inflicted heavy casualties. Reinforcements arrived, and both sides fed more troops into the action. Supported by Brig. Gen. Samuel P. Heintzelman's Third Corps and Brig. Gen. John Sedgwick’s division of Brig. Gen. Edwin Sumner’s Second Corps that crossed the rain-swollen river on Grapevine Bridge, the Federal position was finally stabilized. Johnston was seriously wounded during the action, and command of the Confederate army devolved temporarily to Maj. Gen. G.W. Smith. On June 1st, the Confederates renewed their assaults against the Federals who had brought up more reinforcements but made little headway. Both sides claimed victory but Johnston's wounding had profound influence on the war: it led to the appointment of General Robert E. Lee as Confederate commander. The more aggressive Lee initiated the Seven Days Battles, leading to a Union retreat in late June.