For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

Two Saturdays ago, Republican presidential candidate Herman Cain floated an idea to dramatically curb illegal immigration: build an electrified fence along the US-Mexico border that could kill people who try to cross it. The next day, he told NBC’s David Gregory that he was joking. That Monday, he reverted to his original proposal after a summit with Arizona sheriff Joe Arpaio. On Tuesday, at the GOP presidential debate in Las Vegas, Cain reiterated that he had been joking, but he refused to dismiss the idea of constructing an electrified barrier across the length of the border.

So could the United States really build an electrified fence along the entire length of the Mexican border? And how much would it cost?

First off, you’d have to build lots of fences. Dale Stoutenburg, mechanical technician with Gallagher Security—a multinational fence manufacturer that provides electrified barriers for ports, corrections facilities, and ranches—says the company is capable of building fences up to 75 miles long. If nothing else, they’re pretty easy to power—given that the southern border is a desert, solar panels would provide a self-sufficient energy source. Stoutenburg says a panel the size of a big-screen TV could power a 50-mile stretch of 3,000-volt fence.

But from there, things quickly get complicated. Generally speaking, electrified security fences aren’t designed to provide a lethal shock. “We refer to it as a ‘safe but memorable’ pulse; you don’t want to attempt to climb it, but it’s safe,” says Nathan Leaphart, CFO of Electric Guard Dog, a South Carolina-based company that makes perimeter electric security fences. “Really, the lethal electric fence market is extremely small. To my understanding it’s only for like maximum security prison-type situations. Occasionally, will see it on the local news, but frankly no one’s ever asked me to build one.”

Killing someone with an electric fence takes a good deal of engineering. It has a lot less to do with voltage than the force of the current. If the current isn’t strong enough, the shockee might just keep on climbing—and if the current is too strong, the chances of it being lethal start to go back down. At 200 milliamps of current you might end up with third degree burns and be knocked unconscious for a bit, but on the upside, you’ll be thrown off the fence almost immediately. This clip from Jurassic Park, in which a 30-foot-high electrified dino-fence shocks a young boy, illustrates that point:

So if you really want a lethal fence, you’ll need a sustained current (as opposed to a pulse, which switches on and off every couple of seconds) that’s low enough so that the shockee will essentially be paralyzed and unable to release his or her grip, thereby staying on the fence long enough to killed. That kind of killer shock happens from time to time with livestock, which become entangled in electrified fences and die from the extended electrocution. Cain’s proposed fence also calls for barbed wire on the top, which is not recommended for electric fences because of the risk that animals or people will become trapped on the fence. But in this case, since lethality is the goal, it would actually be a benefit.

If President Cain decided to go ahead with the construction of an entirely new fence the length of the border, he would run into another fairly significant hurdle: water. The Rio Grande doubles as the international border from El Paso to the Gulf of Mexico. It’s anything but an unmovable line in the sand: In 2008, it rose 27 feet in some places and left parts of the Big Bend region in West Texas underwater. If an electrified fence is submerged, it could be rendered functionally useless.

“The fence would still try to power through the water to get through that, but it’d be bogged down so hard the shock value wouldn’t be worth nothing,” Stoutenburg says. Also, he says, “The real problem is moving water and what it carries with it.” A downed power line or any large object in the floodwaters could function as a battering ram against the fence. Another problem is that a fence along the river could turn into a dam when the river spills over, potentially altering the course of the Rio Grande—and the border itself. “That would be very hard to control and unengineer and fix, and would be in violation of treaties with Mexico,” says Matt Clark, of Defenders of Wildlife in Arizona, which monitors environmental issues in the Southwest.

“Really, the lethal electric fence market is extremely small. To my understanding it’s only for like maximum security prison-type situations.”

So how much would this electrified border fence cost? First, you’d need to build a new fence from scratch; you couldn’t simply run a wire through the existing stretches of fence. “We really can’t electrify an existing fence,” Leaphart says. “Just the way these electrical pulses work, you can’t make it operate in something that’s built in the manner that a chain link fence is built. It’s an independent fence and you have to have isolated wires that are kept off of holes to keep them from [wearing] out. It really does have to be built separately.”

Cain, along with Rep. Michele Bachmann, has specified that the fence should extend across the entire southern border and should be contiguous (as opposed to the “virtual fence” of surveillance cameras and drones the feds use in some parts). The border with Mexico is about 2,000 miles long, stretching from Brownsville, Texas, on the Gulf of Mexico to San Diego on the Pacific. But the per-mile cost of building a fence can fluctuate significantly—anywhere from $2 million to $70 million per mile depending on the terrain and the style of fence. It’s relatively easy to get construction equipment and laborers to operate it in San Diego; it’s a lot harder to get it into the middle of Cabeza Prieta National Wildlife Refuge in Arizona. And no one’s even tried to come up with a cost estimate for a fence through Big Bend National Park, which hugs 244 miles of the border in Texas. Much of that route is inaccessible to vehicle traffic, and a lot of it is inaccessible even by foot. Especially the part of the border that’s a giant canyon:

From the Border Patrol’s perspective, there is no need for a fence in these kinds of inaccessible or inhospitable areas; the unrelenting desert is a sufficient obstacle. The agency maintains that only 652 miles of the southern border actually need a man-made physical deterrent; 649 miles of barriers and fences have already been installed.

So what’s the bottom line? A 2006 Congressional Research Service report (PDF) found that the total cost of building and maintaining a fence along 700 miles of the border could be as high as $50 billion. The New York Times pegged it at about $22.4 billion to complete a contiguous border fence for the other 1,400 miles—and that’s not including the cost of purchasing land. Those two calculations are a bit imprecise and based on different sets of assumptions—Cain himself might say they’re “apples and oranges“—but they’re at least a starting point. You might realistically peg the cost of a second fence, this one with a near-continuous electric pulse capable of killing a human, at certainly no less than $75 billion. And unlike the Great Wall of China, which Cain has previously floated as a model, the fence he’s talking about building is only expected to last 20 to 25 years.

On the plus side, that makes the money spent on warning signs look like lunch money. As Cain noted, the electric border fence would have to have “a sign on the other side that says, ‘It can kill you!'” But for liability purposes, you would want signs on both sides of the border, since the fence wouldn’t discriminate between unlucky American citizens and foreigners. Leaphart’s company recommends placing a warning sign every 50 to 100 feet. For the entire length of the border, that adds up to about 106,000 signs per side. Using the conservative assumption that the signs would cost $100 apiece, they’d cost $21.2 million. It’s also considered standard practice to construct a barrier such as a nonelectric chain-link fence in front of the electrified fence, to prevent accidents.

To Cain’s credit, there are precedents for constructing an electrified fence along the length of an international border. North Korea maintains its 151-mile demilitarized zone with South Korea through a combination of deadly electrified fences and land mines. India has built hundreds of miles of electrified fences through Kashmir to stop militants from smuggling weapons (though the project took 15 years). And ironically, Uzbekistan, which Cain recently referred to dismissively as “Ubeki-beki-beki-beki-stan-stan,” has built a 380-volt electrified fence along its 130-mile border with Afghanistan.

Update: Here’s one last challenge, which applies to all border fences, but especially electric ones given the effe: how to deal with the Rio Grande’s tributaries? The Pecos River, for instance, flows for 926 miles, before emptying into the Rio Grande.