Finally, the Philae lander has been found. The European Space Agency's (ESA) Rosetta spacecraft has finally located its long-lost lander, the Philae, just a few weeks before its end of mission.

Rosetta's OSIRIS narrow-angle camera captured images of the lander on Friday as it came within 2.7 kilometers from the surface of Comet 67P or Churyumov-Gerasimenko. In the image, the lander was wedged into a dark crack on the comet, showing its main body and two of its three legs.

The images also explained why it had been difficult for ESA to establish communications with Philae following its landing on Nov. 12, 2014.

"With only a month left of the Rosetta mission, we are so happy to have finally imaged Philae, and to see it in such amazing detail," Cecilia Tubiana of the ESA OSIRIS camera team, said in a press release.

The Philae was last seen when it landed on the comet's Agilkia region, and then bounced and flew for two more hours before landing at a region named Abydos, which is on the comet's smaller lobe. Three days after, the lander went into hibernation as its primary power source was drained. It sprung back to life and communicated with Rosetta briefly in June and July 2015 as the comet moved closer to the Sun.

"This remarkable discovery comes at the end of a long, painstaking search," Patrick Martin, ESA's Rosetta Mission Manager, said in the same statement. "We were beginning to think that Philae would remain lost forever. It is incredible we have captured this at the final hour."

Data from the Rosetta and Philae had provided scientists with valuable information about the nature of comets and their role in the formation of life on Earth. On July 26, ESA had shut off the communications link to the Philae, officially ending the search for the lander. This was part of the preparations for Rosetta's end of mission in September.

The Rosetta spacecraft had remained in orbit around the Comet 67P until Sept. 30 when ESA will deliberately crash the spacecraft into the comet's surface to capture close-up photos and data from the comet.