On July 20, 1969, Neil Armstrong became the first person to step on the surface of the moon. But two years prior to that momentous occasion, tragedy would strike the space program: a fire inside a capsule during a launch rehearsal, killing all three men on board and threatening the future of NASA. The 1960s were a frenzied time for the U.S. space program. In 1961, President John Kennedy set a goal to put a man on the moon by the end of the decade. NASA engineers and technicians were working at breakneck speed to make it happen. In his 1966 book Calculated Risk, George Leopold would describe it as “a deadly malady called ‘Go Fever.’”Apollo 1 Prime CrewIn 1966 alone, NASA would fly no less than five Gemini missions. Meanwhile, engineers and technicians were working at a on a third spacecraft — Apollo. It arrived at the Kennedy Space Center in August 1965, with its first launch scheduled for February of the following year.Command Module 012, labeled Apollo One, arrives at Kennedy Space Center, August 26, 1966.Earlier Mercury and Gemini flights were designed to see how humans behaved in space and to conduct rendezvous. Apollo, however, was a whole new ballgame, taking astronauts to the moon for orbital and landing missions. The crew chosen for the first manned mission, Apollo 1: Virgil “Gus” Grissom, Ed White, and Roger Chaffee.Official portrait of prime and backup crews for AS-204, as of April 1, 1966. The backup crew (standing) of McDivitt (center), Scott (left) and Schweickart were replaced by Schirra, Eisele and Cunningham in December 1966.As NASA prepared for the countdown test, last-minute changes were still being made to the spacecraft. No one was concerned. Things were always being done on the fly. Besides, astronauts, who figured they could handle pretty much any emergency, were famous for shrugging off risk.Apollo 1 – Chaffee in Apollo Block I space suit.Walt Cunningham, a member of the Apollo 1 backup crew, recalled “We always expected that we’d lose at least one mission before we landed on the Moon, because of how far we were reaching out. But we didn’t expect it to be on the ground.”Walt Cunningham.But that’s exactly what happened on January 27, 1967. The Apollo crew entered the vehicle at 1:00 p.m. EST, and the hatch was closed at 2:42 p.m. But because of communications problems between the spacecraft and mission control, the rehearsal ran into the early evening.The Apollo 1 crewmen enter their spacecraft in the altitude chamber at Kennedy Space Center, October 18, 1966.At one point, a frustrated Grissom, the capsule’s commander, would shout, “How are we going to get to the moon if we can’t talk between two or three buildings?” Eight seconds later, at 6:31 p.m., came a single horrifying word from inside the spacecraft: “Fire!”Grissom, White, and Chaffee in front of the launch pad containing their AS-204 space vehicleAs the crew struggled with the latch to open the capsule’s door, technicians tried to put out the fire with extinguishers. Soon the pressure inside the cabin became so intense that the hull ruptured and thick, blinding smoke billowed into the control room.Chaffee, White, and Grissom training in a simulator of their Command Module cabin, January 19, 1967.Finally, the door was pried open, but it was too late. After an official investigation, NASA issued a report, stating that the crew had died of cardiac arrest after inhaling carbon monoxide, as well as toxic fumes given off by incinerated materials inside the capsule. In short, they were unconscious before sustaining burns and dying.Legends Of Aerospace: Neil ArmstrongThe news was of little comfort to NASA officials, who were devastated by the loss. A thorough investigation conducted in the following months would uncover a number of mistakes and miscalculations that had led to the disaster.Exterior of the Command Module was blackened from eruption of the fire after the cabin wall failed.For one thing, a spark, most likely from damaged wires beneath Grissom’s seat, started the fire — which then spread in a matter of seconds, due to highly flammable material inside the capsule, such as foam padding and nylon netting.The charred remains of the Apollo 1 cabin interior.Making matters worse, the latch door proved impossible to open because of the intense pressure inside the capsule. The most lethal error, however: the atmosphere inside the cabin. Pure oxygen is necessary in orbit (a combination of nitrogen and oxygen wouldn’t be capable of sustaining life in space). But putting men inside a capsule filled with pure, pressurized oxygen — needing only a spark to ignite — during ground tests was dangerous.Deputy Administrator Seamans, Administrator Webb, Manned Space Flight Administrator George E. Mueller, and Apollo Program Director Phillips testify before a Senate hearing on the Apollo accident.It would take more than 18 months and literally thousands of changes to the Apollo spacecraft to improve safety. Among the revisions: The door of the spacecraft was redesigned to open in just a matter of seconds, and the pure oxygen environment was replaced with a safer nitrogen-oxygen mix for ground tests.Apollo 1 Fliteline medallion flown on Apollo 9 by Jim McDivitt.As a result, a better Apollo capsule was created which most likely saved the space program, as well as lives. Indeed, less than three years following the Apollo 1 accident, NASA was able to launch five Apollo missions without incident.Actual Apollo 1 hatch on display at the Kennedy Space Center Apollo Saturn V complex. Photo by Iraq.vet CC BY-SA 4.0The final one, in 1969, would meet President Kennedy’s challenge, sending Neil Armstrong and Buzz Aldrin to the surface of the Moon.Read another story from us: Houston we have a Problem: How Jim Lovell used Bioluminescent Algae to Land his Broken AircraftNASA pays tribute to the Apollo 1 crew — as well as the crews of Challenger and Columbia, who died in 1985 and 2003 — each January, with a Day of Remembrance. Another honor is an exhibit at the Kennedy Space Center, displaying the hatches from the doors of the ill-fated Apollo I.Barbara Stepko is a New Jersey-based freelance editor and writer who has contributed to AARP magazine and the Wall Street Journal.