The battle of Shiloh (April 3-4, 1862) began when a Confederate army under Albert Sidney Johnston launched a surprise attack on a large force under Ulysses S. Grant. The attack was designed to smash Grant's force before a large contingent of Union reinforcements arrived. The Confederates achieved nearly total surprise, catching the Federals at breakfast, and very nearly swept them from the field. However, the Union army was able to regain its footing, rallying around a salient that became known as the "Hornet's nest," and were able to hold their ground by nightfall.
Two events occurred that turned the battle in Grant's favor. First, Johnston, a very competent and admired general, died from a bullet wound to his leg. Second, Buell's forces arrived by boat in the evening, providing much needed reinforcements. After another day of bloody fighting, the Confederate army, now commanded by P.G.T. Beauregard, withdrew from the field. The two armies suffered over 23,000 casualties in what was the biggest and bloodiest battle on American soil to that point.