The past week has seen a huge increase in attention and momentum for protests against the Dakota Access oil pipeline. Members of the Standing Rock Sioux and other Native American tribes have successfully shut down construction on the $3.7 billion line, which is intended to transport crude oil from the Bakken Shale to Illinois. The project is a subsidiary of Texas-based Energy Transfer Partners, with substantial stakes held by Enbridge Energy Partners and Marathon Petroleum Corp.
The tribes’ objections are both philosophical and practical. They have claimed in court that they weren’t given sufficient opportunity to assess the pipeline’s impact, and that it continues a legacy of exploitation by crossing ancestral land. The proposed pipeline also crosses the Missouri River just a few miles upriver from the Standing Rock Sioux Reservation, which protestors argue jeopardizes the water supply for both the tribe and the entire region in the event of a leak.
Get Data Sheet, Fortune’s technology newsletter.
That’s not an abstract worry. In 2010, a pipeline owned by Enbridge leaked 843,444 gallons of crude oil into wetlands around the Kalamazoo River in Michigan. The NTSB at the time faulted Enbridge’s inadequate leak detection systems as a partial cause of the incident, and Enbridge ultimately made a $177 million settlement with the U.S. government. The environmentalist Polaris Institute found that, according to Enbridge data, that company experienced 804 spills and released 5 million gallons of oil between 1999 and 2010.
But here’s the thing—the Sioux’s legal and ethical claims notwithstanding, blocking a pipeline might not be doing any favors for the overall safety of oil transportation. Because as environmentally disastrous and common as pipeline leaks are, the alternative may be worse.
Over the past decade, the lack of sufficient pipeline capacity (particularly in North Dakota) has made transporting oil by train increasingly common —and a boon for the rail industry. But those trains sometimes explode, as did one in Heimdal, North Dakota in May of last year. By one tally, there were ten such explosions in two years—including the nightmarish 2013 explosion of an unsupervised train in Lac-Megantic, Quebec, which killed 47 people in their sleep.
In 2015, Canada's generally pro-fossil fuel Fraser Institute found that moving fuel by pipeline was 4.5 times safer than doing so by rail. And according to a Fraser representative at the time, “saying ‘No' to a pipeline is saying ‘Yes’ to rail,” which will “increase the risk to the environment and human health and not decrease it.”
For more on oil infrastructure, watch our video:
That might or might not be the case with the Dakota Access Pipeline. Activists might eventually push for a re-routing of the pipeline, or some other compromise. More broadly, the shipment of crude by rail has declined significantly over the past year, both because more pipelines are being constructed, and because declining oil prices have suppressed Bakken production overall.