There was a driving rain on Cape Canaveral on the morning of November 14, 1969, as humanity's second trip to the Moon lifted off with three astronauts on board and President Nixon in attendance. Seven years after his predecessor had kicked off the whole project by famously asking why Rice plays Texas , and not many months after two Americans had become the first humans to make it to the lunar surface , Apollo 12 was headed for a place on the western edge of the near side of the Moon called the Ocean of Storms. First though, they would need to get through an actual Earth-bound storm.

The launch of Apollo 12's Saturn V rocket was perfect, at least for a few seconds. Image: NASA

And then, at approximately thirty sixth and a half seconds, Conrad saw a bright white flash and felt his spaceship, the Yankee Clipper, tremble. On the audio recording , this registers as a static burst. "The hell was that," he said.

"That's a lovely liftoff," Charles "Pete" Conrad, the 39-year-old Apollo 12 mission commander, said to the other two astronauts, Alan L. Bean, and Richard Gordon. "That's not bad at all!"

As the astronauts sped through the storm about a mile and a half up, traveling faster than the speed of sound, the clouds' electrical charge had given way. A lightning bolt, carrying up to a hundred thousand amps and a hundred million volts, had struck the capsule and passed down the metal exterior of the rocket, riding its fiery, highly ionized plume all the way to the Earth. Unbeknownst to anyone at that moment, their spaceship had just become history's highest and fastest lightning rod. And, contrary to the old myth that lightning never strikes the same place twice, it was about to happen again.

Like many things, lightning likes to find the path with the least resistance, and it's very consistent about this. Under those stormy circumstances that morning over Florida, that path passed directly through the highly-ionized path the rocket was forging on its way to space, now at about 400 feet per second.

Unbeknownst to anyone, their spaceship had just become history's highest and fastest lightning rod.

At 52 seconds, as the rocket traveled at over 1,600 feet per second, another bolt shook the craft. The "8-ball" attitude indicator spun wildly and the lights on the instrument panel stopped flashing and went dead.

"The lights came on, more lights than I'd ever seen in the simulator," Bean recalled in a 2003 History Channel documentary . No simulator test—there had been hundreds of hours of them—had prepared them for this scenario, whatever it was.

Almost all of the warning lights on the instrument panel suddenly lit up like Christmas. Apparently, they reported, the Yankee Clipper's main power was gone.

In Houston, the stream of data coming out of the capsule was garbled. And without that data, there was little information with which to figure out what was happening. "Roger," was all Mission Control could say.

Alan Bean's first thought was that the capsule had disconnected from the rocket; but the G-forces on his body told him otherwise. Conrad radioed back to Houston: "I don't know what happened here, we had everything in the world drop out!"

Mission Control, Apollo 12: from l to r, director of flight operations Chris Kraft, flight director Gerry Griffin, and, third from right, in glasses, EECOM John Aaron

The astronauts approaching space and the engineers on Earth now had ninety seconds to decide whether to abort.

Confusion descended over the room of engineers as they stared at their screens. The rocket seemed to be flying correctly, burning some thirteen metric tons of fuel per second. Backup batteries had kicked in, but engineers knew that those would only last a couple of hours. If the ship continued on its course and made it into orbit, returning to earth with little power would be difficult, to say the least. (When an oxygen tank exploded on board Apollo 13, a few months later, they would need to tackle that kind of problem .)

Since Mission Control had no access to the capsule's data, assessing the problem fell, in part, to the astronauts. Conrad's hand hovered near the abort lever. Procedures dictated that in the event of a power failure, the astronauts could abort the launch themselves. They could have tried to flip switches, in the hope that things would come back on. But significantly, while the astronauts were in the dark, they didn't jump to conclusions. They didn't act.

For an eternity of twenty seconds, according to the official transcript , Mission Control's side of the radio remained silent. Awfully silent.

Seconds passed; time slowed down. For the astronauts, it was literal: as they sped into space (at 60 seconds they would surpass the speed of sound), time was literally slowing down .

In that case, the astronauts would be separated from the rocket and hopefully land in the ocean, where they would be rescued, and the rocket and the nation's space dreams would be blown to smithereens. Hopefully.

"One of the rules of space flight is you don't make any switch-a-roos with that electrical system unless you've got a good idea why you're doing it," Bean explained later. "If you don't have power at all, you might change a couple of switches to see what will happen. When you have power and everything is working, you don't want to switch too much. I didn't have any idea what had happened. I wasn't aware anything had taken place outside of the spacecraft. I was visualizing something down in the electrical systems."

This voltage change, he discovered, had effected a device called the SCE, or Signal Conditioning Equipment, which was responsible for converting raw signals from the craft's sensors to standard voltages so that information could be displayed on instruments and relayed back to Houston. By switching the SCE to auxiliary or backup power mode—Aux—Aaron remembered that the SCE would continue to operate under lower-voltage conditions, and the instruments would come back. At that point, the fuel cells could be restarted. In a matter of seconds, the solution came to him.

In his mangled data, Aaron had recognized a pattern. A year earlier, by sheer coincidence, Aaron happened to be in Mission Control during a launch pad simulation. And that night, he remembered, he had briefly noticed a similar set of gibberish on the screen, "some squirrelly kind of numbers," as he told a NASA interviewer later. He realized that the team handling systems that night had briefly dropped the capsule's voltage by accident.

Approximately fifty seconds after his screen had first scrambled, he calmly issued a suggestion to his Mission Control colleagues.

Miles below, John Aaron, a 24-year-old NASA engineer who hailed from Oklahoma, stared into his monitor and its garbled data. As the environmental control engineer, or EECOM , he was responsible for knowing everything about the spacecraft's electrical systems.

There were over a hundred switches. Neither of them knew where that one was.

Now it was the astronauts' turn to puzzle. Conrad and Gordon were clueless. "FCE to Auxiliary—what the hell's that?" Conrad shot back. "NCE to auxiliary…"

Sixty seconds had passed since the initial lightning strike. No one else knew what to do. The call to abort was fast approaching.

"What the hell's that," blurted out Gerald Carr, who was in charge of communicating with the capsule. The rookie flight director, Gerry Griffin, didn't know either.

"SCE to off?" someone says on the NASA transcript. The switch was so obscure that neither of his bosses knew what he was talking about.

"Now we're working out our problems here," said Conrad. "I don't know what happened. I'm not sure we didn't get hit by lightning!"

Aaron could now see it bright as day: the fuel cells had become disconnected. A few seconds later, Mission Control told Bean to reset them. Power returned. The launch continued as if nothing had happened. Brows were wiped.

In the command module, the lights on the instrument panel calmed. Down at Mission Control, the data streams flipped to normal.

But Bean, who was sitting in the right seat, just in front of the switch, remembered it from the sim the previous year.

"There wasn't any time for that up here," he replied. And then Conrad broke out in laughte r.

Conrad chuckled. "That's one of the better sims, believe me."

He added: "I think we need to do a little more all-weather testing."

"Well, I'll tell you one thing," said Conrad, "this is a first-class ride, Houston."

"We're all chuckling up here over the lights," Bean said. "There were so many on we couldn't read em. [Long pause]"

Mission Control had to make the call: enter trans-lunar injection and blast toward the Moon, or try a final abort. Chris Kraft, the deputy director of Johnson Space Center, turned to Gerry Griffin, the flight director. "Don't forget that we don't have to go to the Moon today," he told him.

But there was still a decision to make. Despite the fresh power and the clean data, Mission Control still didn't know the damage to the spacecraft. If the Command Module had been damaged by lightning, it was possible that it wouldn't make it all the way to the Moon, in which case a return to Earth would be optimal. But if the capsule's parachute had been damaged, a safe return to Earth would be impossible.

But NASA managers had one lingering concern about Apollo 12's return to Earth: if the parachutes were indeed damaged, the capsule would violently smash into the Pacific Ocean and the crew would be killed instantly.

Apollo 12 would hit the lunar surface on November 19, 1969, guided down by radar and computer to a landing a few meters from the Ocean of Storms, where the old Surveyor 3 robot spacecraft had soft-landed on the surface of the moon two years earlier. Everything proceeding beautifully.

The incident would be dramatized in HBO's From the Earth to the Moon , but I prefer its depiction in the History Channel documentary Failure is Not an Option :

NASA would analyze photographs later, and determined that not just one but two lightning bolts had struck the capsule, within twenty seconds of each other. The whole incident was captured in the live, nationally-televised broadcast of the launch, as millions of people around the world watched. This one's from NASA's feed—the final countdown starts at around 21:45:

"I'll tell you, Jer," Gordon said, "we were just wondering if we'd trained for that launch, either."

"We looked at each other and said, 'Hell no, let's go!'"

"We kept clicking off the checklist," Griffin remembered later , "and when we got to the end we all kind of said, 'We don't know where all that stray electricity have have run around in the cabin, but everything we can check looks okay. Is there any reason not to go?'

If we had [the astronauts] enter [the Earth] now they'd get killed earlier than if we sent them to the moon and let them do whatever else they're doing there and then come back 10 days later. And if their parachutes don't work then, well... At least they've had 10 days in a great adventure.

Bean, now 82, later learned more about the calculations that were going on down at Mission Control during the launch, under the assumption that lightning had destroyed part of the capsule or its parachutes. He described it like this recently to NPR :

Charles Conrad Jr. planting the flag, which turned out to present another of the mission's malfunctions: it wouldn't stick up straight. Image: NASA

The capsule would land safely. After being kept in a quarantine for 21 days for fear of disease, the crew had a chance to visit Kennedy Space Center and to thank the launch team personally.

About an hour before the astronauts would enter Earth's orbit, "I think either Pete, Dick or I said, 'Well, I wonder how those parachutes are doing?' And then someone else said ... 'Well, we'll find out in about 55 minutes!'"

Because there was no way to determine if the parachute system had been damaged—it had no sensor—there was no use being afraid, the astronauts knew. There was no time to be afraid. "If you couldn't have that attitude you couldn't do the job, so it was OK. Whatever it was, it was OK… I was operating on a timed checklist that we've been trained to do, to try to maximize every really minute on the moon," Alan said later. "[There's] no telling what that costs per minute to be on the moon — millions and millions of dollars — so you wanted to make every one of 'em productive."

If it hadn't been for the quick thinking of John Aaron (and the recall of Alan Bean), one of those lightning-induced failures might have thrown the entire lunar program off course, and possibly resulted in three deaths. Alongside the rescue of Apollo 13, the calm rescue of Apollo 12 was considered to be NASA's "finest hour."

"Lightning is a very difficult thing to accurately measure because the phenomena associated with lightning tends to disrupt the instrumentation and corrupt the data that is trying to be captured," Gary Snyder, a specialist with NASA's lightning team, said in 2011 . "Previous systems have historically produced erroneous data and have failed at the worst times."

And, amazingly, during another 1987 launch, two sounding rockets resting on launch pads at NASA's Wallops Island were prematurely launched due to a lightning strike.

Lightning has sabotaged at least two other NASA missions. During a launch on March 26, 1987, a cloud-to-ground lightning flash struck the unmanned Atlas Centaur 67, which was carrying a Naval communication satellite. The current apparently altered memory in the digital flight control computer, which resulted in the generation of a hard-over yaw command, leading to "an excessive angle of attack, large dynamic loads, and ultimately the breakup of the vehicle."

NASA would spend the next decades studying and preparing for lightning strikes at its launch pads—a problem that, despite lightning prevention systems , hasn't gone away.

"We forgive the weather man for his job," Pete Conrad told them, "but had we to do it again, I'd launch under exactly the same conditions."

"The quick response to the Apollo 12 outage came about not as a result of blind luck but of careful planning, training, and development of people, procedures, and data display techniques by those responsible for flight control," it read.

In 1972, after Apollo 17 returned from the Moon, the program was ended, at an estimated final cost of $25 billion (or $170 billion in 2005 dollars). In a NASA report that year entitled "What Made Apollo a Success," Gene Krantz and James Otis Covington concluded that discipline and knowledge had been a crucial ingredient, and they pointed to Apollo 12's quick rescue as an example.

"Our simulators were not even sophisticated enough that if we had, would it have necessarily produced the exact signature that I saw," he said. "So only just by your research and 'what if' and contemplation and thinking about things and try to think of all, do you prepare yourself for that kind of event."

Aaron said that when he happened to notice a strange data signature during that launch simulation one night in 1968, his "natural curiosity" led him to better understand why that happened. He observed that, in preparing to get humans out of Earth's orbit and over to the Moon, and down, and collect rocks, and conduct science, and then up and back to Earth, NASA had never anticipated a lightning bolt.

In 2000, weeks before his retirement from NASA, an agency historian interviewed Aaron—who is now 71 and living in Texas—and started by asking, "How did you learn about the systems and procedures and that kind of thing?"

It's digging in with that kind of curiosity of why things do what they do and how things interreact.

Aaron noted another ingredient in the lightning bolt affair, and in his lightning-fast intervention, and it was one that seemed to contradict NASA's findings.

"Luck plays a part," he said. "Now, it was not only luck that at a pad test I saw that, an inappropriate sequence was being executed in a pad test, it was also the luck that it would happen during the launch phase and that I was the flight controller. If you had had any other EECOM there, they didn't see that pattern. But it's digging in with that kind of curiosity of why things do what they do and how things interreact was the motivation for why I think I became a good flight controller."

Aaron's curiosity and some untold measure of luck would help him a year later, when he was called on to help rescue the nearly-doomed Apollo 13 mission. Aaron developed the innovative power-up sequence that allowed the Command Module to return to Earth on very limited power, and save another group of astronauts.

By that time, Aaron's "SCE to Aux" rescue had already become part of NASA legend, and earned him what was said to be the highest of the agency's nerdy, innuendo-rimmed compliments: the nickname "steely-eyed missile man."