A century and a half ago, the Civil War rocked America. But as it turns out, the war itself — in particular, the pivotal battle of Gettysburg in July 1863 — was influenced by rocks.

A just-published article in Geosphere, the journal of the Geological Society of America, details how rock formations helped to determine the outcome at Gettysburg, where Union forces stopped a desperate Southern effort to invade the North, and ultimately sealed the Confederacy’s fate.

Scott P. Hippensteel, an associate professor of earth sciences at the University of North Carolina at Charlotte, analyzed the geology of Gettysburg. He found that a mixture of harder diabase and softer sedimentary rocks produced features such as Cemetery Hill and Little Round Top, which provided strong defensive positions for the Union Army.

NEWS: Civil War Cannons Pulled from River

But rock formations didn’t always necessarily benefit the Union side. Carbonates, limestones and dolostones shaped the terrain of battlefields such as Antienam, the spot in Maryland where Confederate forces repulsed a Union attack in September 1862.

“On many battlefields, outcropping limestone proved beneficial for attacking troops,” Hippensteel writes. “Differential weathering within carbonate formations produced rolling terrain that limited the range and effectiveness of both artillery and small arms.”

One example of the latter was the infamous “Sunken Road” at Antietam, where 2,600 Confederate troops managed to hold off a Union force of 5,500 for three-and-a-half hours, thanks in part to the terrain. The Union ultimately prevailed, but took heavy casualties.

NEWS: Rare Photos Show Civil War Life

Other battlefields with such features included Stones RiverChickamaugaFranklinNashville and Monocacy, a July 1864 battle in which Union troops thwarted a Confederate assault on Washington, D.C.

Hippensteel analyzed casualty data to see which rock formations were the most advantageous to defenders. He found that soldiers defending ground underlain by limestones and dolostones had a slightly higher casualty rate — 14 percent — than those defending terrain above non-carbonate rocks or unconsolidated sediments, who were killed and wounded at a 12 percent rate.

“This suggests, in a limited manner, that the local smaller-scale defensive advantages provided by limestone, such as karrens, were not as important as the regional-scale advantages for attacking troops, including rolling terrain or forest cover,” he writes.