(Bloomberg) -- Mere hours before Intuitive Machines’ spacecraft was supposed to perform a historic landing on the surface of the moon, the company’s engineers discovered a major problem.

Navigational lasers on board the Nova-C lander, nicknamed Odysseus, were not working properly. Designed to operate together with cameras on board the spacecraft, the lasers were critical tools needed for a safe landing attempt.

“The lasers are intended to determine altitude and horizontal velocity, but the ones on the lander right now are not working,” Josh Marshall, the communications director for Intuitive Machines, said during the livestream of the landing less than an hour ahead of the landing attempt Feb. 22.

The tense moments underscored a frightening truth for Intuitive Machines and it’s partner, NASA: Most moon missions fail. It had been more than half a century since the US successfully landed on the lunar surface, and multiple private-sector companies have fallen short in recent years.

Read More: US Moon Mission Defies Odds in Victory for Commercial Space Race

Intuitive Machines and NASA had to think fast to salvage the landing. They decided to turn to a NASA technology payload riding on the side of the lander. It was a doppler lidar navigational tool, which uses lasers and frequency readings to come up with more precise measurements for the speed, direction and position of an object in space.

“One of the challenges for doing any space mission is knowing where you are,” Prasun Desai, deputy associate administrator of space technology at NASA, said during the livestream. “We’re looking to develop newer capabilities” to bring more precision. 

But the doppler lidar payload was only meant to be a backup system – more of a technology demonstration. It was going to need fast changes in order to become the primary navigation for Odysseus’ landing.

So while the lander was still in orbit around the moon, Intuitive Machines and NASA decided to take another lap. This gave mission control an extra two hours to create and send software patches up to Odysseus. 

A landing time that had been set for 4:24 p.m. US East Coast was suddenly switched to 6:24 p.m. Nervous traders placed sell orders of Intuitive Machines’ stock, which fell more than 8% in after-hours trading in New York. 

While the lander circled the moon once more, controllers on the ground sent software patches for Odysseus to use two lasers from the lidar experiment as the vehicle’s main navigational tool for the landing. 

There was no guarantee that this would work. But at roughly 6:11 p.m., Odysseus ignited its engine, taking itself out of orbit and putting it on course for a moon landing. As it descended, the lidar’s lasers processed the information the spacecraft needed. They determined the lander’s height above the moon and how it was moving relative to the surface.

“We need to get an understanding of the vertical velocity so it knows how much thrust to slow down, but also the lateral velocity because if it comes down sideways too much, it can tip over,” Desai said.

At the time of the planned touchdown, it was unclear if the backup system had worked. Anxious minutes passed before Intuitive Machines was able to acquire a signal from Odysseus. Then a voice popped up in mission control.

“We’re not dead yet,” said Tim Crain, Intuitive Machines’ co-founder and chief technology officer. Shortly afterward it was confirmed: Odysseus had landed and was transmitting a signal.

Clapping and cheers filled mission control and an adjacent observation room. Intuitive Machines’ shares began to soar. And NASA Administrator Bill Nelson sent congratulations via webcast. 

“Today for the first time in more than a half century, the US has returned to the moon,” he said.

©2024 Bloomberg L.P.