NEW DELHI — A software engineer in the south Indian city of Chennai who pored over satellite images in his spare time helped NASA locate the debris of India’s ill-fated mission to the moon.

Shanmuga Subramanian looked at images of the moon’s surface on two laptops for six to seven hours a day until he found what he thought might be the debris of the moon lander, he told Indian television channel NDTV on Tuesday.

He sent NASA an email in October with his findings. On Monday, NASA confirmed the discovery and credited Subramanian for his help. Subramanian provided a “positive identification of debris,” it said.

On his blog, Subramanian describes himself as a coder, photographer and nerd. In his spare time, he runs a Facebook page that provides live updates on rainfall in Chennai. “I did feel a lot of happiness that I was able to find it,” he told NDTV of his discovery, saying he never misses a launch by India’s space agency.

India’s Chandrayaan-2 mission launched in July. It was supposed to land near the south pole of the moon Sept. 7. A successful landing on the moon is a huge technical feat: This year, an Israeli spacecraft crashed while attempting it.

The voyage of Chandrayaan-2 transfixed India and put it on the brink of becoming only the fourth country in the world to land a rover on the moon.

But the effort ended in heartbreak when Indian space engineers lost contact with the craft during the final minutes of its descent to the surface. Hours later, Indian Prime Minister Narendra Modi hugged the head of the Indian Space Research Organization (ISRO) as the official broke down in tears. The government later said the craft had “hard-landed” on the moon.

ISRO announced that it located the lander the day after the crash but provided no further details or images. The location of the debris remained a mystery to the rest of the world until Monday, when NASA released images showing the main crash site as well as scattered wreckage.

Subramanian shared an email message he received early Tuesday from a NASA scientist congratulating him on his discovery. He urged India not to lose heart and to continue investing in its space ambitions.

“Failure is a steppingstone to success,” Subramanian told NDTV.