Gettysburg, Battle of, July 1–3, 1863, a decisive battle of the American Civil War. It stopped the last attempt of Confederate forces to invade the North.

General Robert E. Lee had defeated Major General Joseph Hooker at Chancellorsville, May 2–4. Lee then led a Confederate army of 75,000 northward through Maryland into Pennsylvania, threatening Harrisburg, Philadelphia, and Baltimore. He was opposed by 88,000 Union soldiers under Major General George Gordon Meade, Hooker's successor. Neither leader planned to fight at Gettysburg, a small town in southern Pennsylvania.

On July 1, Confederate forces marching from Chambersburg in a search for supplies were fired on by Union cavalry scouts northwest of Gettysburg. Both sides called up reinforcements and the fighting swayed back and forth as they arrived. Toward evening Union forces fell back through the town. They took up a defensive position shaped like a fishhook, with Cemetery Ridge as its shank, turning back toward Culp's Hill, with Spangler's Spring at the barb. The line was about three miles (5 km) long. The Confederates occupied Seminary Ridge, two-thirds of a mile (1 km) west.

On July 2 Lee ordered attacks on both Union flanks. On the right, Lieutenant General James Longstreet fought through a peach orchard and wheat field, and attacked Little Round Top. He was stopped when Major General G. K. Warren rallied Union troops to hold Little Round Top. On the left, Lieutenant General Richard S. Ewell attacked Cemetery Hill and Culp's Hill, taking some Union trenches.

A Union counterattack on the morning of July 3 drove the Confederates back from these positions. Lee then ordered Longstreet to attack the Union center. In mid-afternoon, some 15,000 men, headed by Major General George E. Pickett's division, charged (giving this action the name “Pickett's Charge”). Under concentrated infantry and artillery fire, only a few reached the Union lines. A stone wall, called the High Water Mark of the Confederacy, marks their point of furthest advance. Meanwhile, Major General J. E. B. Stuart's Confederate cavalry, which had been detached, attempted to break through, along Hanover Road east of the town, but was stopped by Union cavalry.

Losses in the battle were 28,000 for the Confederates and 23,000 for the Union. Lee retreated on July 5, but was delayed by floods and did not cross the Potomac River until July 13. Meade failed to take advantage of this situation and was bitterly criticized.

Gettysburg National Military Park, 3,865 acres (1,564 hectares), has 2,390 markers, monuments, and statues commemorating main events and participants in the battle. It was established in 1895. Gettysburg National Cemetery, site of President Lincoln's Gettysburg Address, is adjacent to the park.