There’s almost enough pipeline transporting crude oil and other chemicals buried under Texas to reach the moon and back. Last week, one small section of that infrastructure in Bastrop County was damaged by a maintenance crew. The result was a spill of more than 50,000 gallons of crude oil.

That wasn't the first time that particular pipeline, the Longhorn pipeline, raised concerns in Central Texas.

The pipeline's history can tell you a lot about how communities and pipelines change, and sometimes come in conflict. It was built to carry crude oil from the Permian Basin in West Texas to refineries in Houston way back in the 1950s – when the state was an entirely different place.

“Texas, obviously, is growing steadily in population and some once-remote areas where pipelines were the only thing in town are now seeing communities spring up around them,” says Bill Christian, a lawyer with Graves Dougherty Hearon & Moody who works on pipeline cases for landowners.

He says the Longhorn line actually went dormant for some years while Texas oil production slumped. Then in the '90s, companies saw a business opportunity to reverse the pipeline’s flow and use it to ship gas from Houston out west.

“When the Longhorn pipeline was put back in operation in the 1990s, a lot of people were very surprised to see that it was practically in their backyards in South Austin,” Christian says.

One of those people was Austin-based environmental engineer Lauren Ross.

“Actually, it was the [company that runs the pipeline that] originally approached me and said, 'Will you work for us?’” Ross says. “I consulted with some of my environmental allies, [asking] ‘Do you think this is a good idea?’ and they said, ‘No actually we’d like to hire you.’”

KUT's Mose Buchele reports

Ross and her group fought the new plan — but lost. The pipeline converted to carrying gasoline in the early 2000s.

Then, about seven years ago, a new oil boom hit Texas, and the pipeline reverted to its original use. It again carries crude to Houston.

Christian says that's an important lesson: “The use of the pipeline can change based on the market conditions."

It's important because of the risk associated with different chemicals.

Ross says when she heard about the rupture in Bastrop last week she was really glad that it was crude oil and not gasoline, "because crude oil is not as flammable, so it’s safer.”

She also imagines that the incident taught a lot of people in South Austin that a pipeline runs underneath them. It crosses into Austin around the Onion Creek neighborhood and runs west into Circle C.

But it’s not all built of the same material.

When the pipeline was reopened around 20 years ago, Ross says, workers "did completely replace [the pipeline] through the Edwards Aquifer Recharge Zone and in the watershed of Pedernales River [with] state-of-the-art pipeline."

“If you go to the Dove Springs neighborhood or to Bastrop, those pieces of pipe were not replaced.”

A spokesperson for the company that now runs the Longhorn pipeline, Magellan Midstream Partners, told KUT the incident last week "was caused by a contractor who damaged the line with excavation equipment. The accident had absolutely no correlation to the age of the pipeline.”

Magellan says the pipeline is already repaired and running crude again. Despite such spills, experts say, pipelines remain the safest way to transport crude oil and other chemicals.