At the heart of their battle is whether the pipeline would pose a threat to the massive Ogallala Aquifer — one of the world’s largest underground sources of fresh water. By one calculation, it holds enough water to cover the country’s 48 contiguous states two feet deep. The Ogallala stretches beneath most of Nebraska from the Sand Hills in the west to the outskirts of Omaha. And it runs from South Dakota well past Lubbock, Tex.

Named after a Northern Plains tribe, the Ogallala provides water to farms in eight states, accounting for a quarter of the nation’s cropland, as well as municipal drinking wells. Though early white explorers who saw this apparently arid part of the Great Plains called it a “great American desert,” the aquifer has turned it into America’s breadbasket.

The spongelike aquifer formed more than 20 million years ago, when erosions of gravel and sand from the Rocky Mountains were washed downstream. It is replenished by rain and melting snow, but it gets just two to five inches of precipitation a year, according to a ­TransCanada filing to the Nebraska Department of Environmental Quality. Much of the water it holds was absorbed thousands or millions of years ago.

In some places the aquifer is buried 1,200 feet deep, but in many places it is at or very close to the surface, often less than five feet below ground. In these places, you can literally stick a stake in the ground and hit water. Extensive stretches of Nebraska’s plains require no irrigation; to keep cattle watered, ranchers just dig a hole and the water flows in.

That’s where concerns about the Keystone XL came in. Its original route traversed 92 miles of the Sand Hills and the Ogallala. TransCanada, which said it would bury the pipeline at least four feet underground, could in many places be putting it in water.

If the pipeline should spring a leak where it touches the aquifer or even above it, Kleeb and other opponents say, oil could quickly seep into and through the porous, sandy soil. The Ogallala, Kleeb said last year in a television interview, is “a very fragile ecosystem, literally made of sand. . . . To have a pipeline crossing that region is just mind-boggling.”

She cited University of Nebraska civil engineering professor John Stansbury, who drew on pipelines’ history and TransCanada regulatory filings to predict that during the projected 50-year life span of the pipeline, “there would be 91 leaks . . . that could potentially put 6.5 million gallons of tar sands oil in the Ogallala aquifer and essentially contaminate our drinking water.”