One of the first molecules to form after the Big Bang was spotted roughly 3,000 light-years from Earth in a dusty remnant of a sun-like star.

The molecule was spotted by NASA's Stratospheric Observatory for Infrared Astronomy (SOFIA) in a planetary nebula, NGC 7027, according to findings published in Nature magazine. Helium hydride — a combination of helium and hydrogen – was one of the first molecules to develop from atoms as for hundreds of thousands of years after the Big Bang, the universe was too hot and too full of radiation for atoms to bond together. The study suggested that 100,000 years after the Big Bang, the universe cooled enough for helium and hydrogen to combine, forming the molecule known as helium hydride.

The same molecule was earlier produced and tested in a laboratory setting, however, this discovery marks the first time that the molecule has been detected in space, revealing the chemistry of the early universe, according to a statement from NASA.

READ MORE: Biogenic? Mars Rover Takes Photos of 'Mushrooms' Growing on Red Planet’s Rocks

"This molecule was lurking out there, but we needed the right instruments making observations in the right position — and SOFIA was able to do that perfectly," Harold Yorke, director of the SOFIA Science Center in California's Silicon Valley, said in the statement.

The hydrogen atoms, interacting with helium hydride and creating molecular hydrogen became the basic elements of star formation, and stars went on to produce all the other elements, NASA noted in the statement.

"The lack of evidence of the very existence of helium hydride in interstellar space was a dilemma for astronomy for decades," Rolf Guesten, lead author of the study from the Max Planck Institute for Radio Astronomy in Bonn, Germany, said in the statement.

NGC 7027 has been a location of interest for helium hydride since the late 1970s. Scientists believed that ultraviolet radiation and heat from the ageing star could create an environment suitable for helium hydride to form. However, astronomers were unable to confirm this theory until now.

It was possible to detect helium hydride because of the SOFIA instrument — a telescope that is flown on a Boeing 747-SP airplane at an altitude of up to 45,000 feet, where its observations are not impacted by interference from Earth's atmosphere, while also returning to Earth after every flight, allowing scientists to regularly update the instrument with the latest technology. One of the most recent upgrades included adding a specific channel to detect signatures of helium hydride, which previous telescopes did not have.

"This flexibility allows us to improve observations and respond to the most pressing questions that scientists want answered," Naseem Rangwala, SOFIA deputy project scientist, said in the statement.