After 13 years, the Cassini spacecraft made one of its last passes of Saturn's moon Titan in an effort to learn more about its atmosphere. This, before the spacecraft disintegrates as it plunges into Saturn on September 15.

Titan, the second largest moon in our solar system, has been a main focus of the Cassini-Huygens mission over the past two decades.

It has one of the thickest atmospheres in the solar system, and it's one of the only moons to have any atmosphere at all, a unique feature that's driven curiosity about the moon since it was discovered by Christaan Huygens in 1655. But the thick orange atmosphere of nitrogen and methane made it difficult for astronomers to view its surface from afar.

Titan's atmosphere, made up of mostly methane and nitrogen, surrounds Saturn's largest moon with an orange haze. NASA/JPL-Caltech/Space Science Institute

The Voyager One spacecraft got close in 1980, but again the images were obscured by the orange haze.

After the Voyager mission, it was decided by NASA and the European Space Agency (ESA) to return to the Saturn system and investigate Titan. They developed the Huygens probe, which was meant to hitch a ride with Cassini, deploy to Titan, float down through the atmosphere, land on its surface and send back data about the trip.

In 1997, after more than a decade of development and billions of dollars invested, the Cassini-Huygens spacecraft successfully launched from Cape Canaveral, Florida. But, on the way out to the Saturn system, the Titan mission was nearly derailed.

"There was a problem about how the receiver was built. It was built for a particular frequency range," said Trina Ray, the Titan orbiter science co-chair at JPL. "It’s as if all of your listeners were tuned to 89.2 instead of 89.3."

Even if the Huygens probe survived the landing on Titan, it wouldn’t be able to send data back to earth because of the mistake. In a mad rush, engineers tried tweaking Cassini’s trajectory to fix the issue before the spacecraft got there.

But there were other threats too, including the fact that scientists were unsure about what the probe was going to land because they hadn't seen any clear pictures of the surface. It was possible that it could land on a mountain and tumble down, in an ocean of liquid ethane or safely in the middle of a mudflat.

After observing the moon from above, Cassini released the probe towards Titan in the winter of 2004. It descended through the planet's atmosphere, its instruments hummed to life and its parachutes deployed.

On the way down Huygens sampled Titan's atmosphere, it measured the wind speed, temperature and pressure, and it took pictures.

Soon, it beamed back data to Cassini, orbiting above, which passed it back to scientists on Earth.

Luckily, the fix had worked.

"These images are coming in over the course of these hours," said Ray. "And there was one image that came by where you could see these channels[...]that you just knew that this was an Earthlike body. And just every picture that got revealed made it even more earthly."

An infrared view of Saturn's moon Titan taken by Cassini on November 13, 2015. NASA/JPL-Caltech/Space Science Institute

The mission revealed that, similar to Earth, Titan didn’t have many craters, which meant that its thick atmosphere acted as a shield against meteors. There were rivers and lakes made of ethane and methane. And it was so cold there that there were mountains of ice.

"Little chips of water ice come off [the mountains] and get washed downstream, and then they get pushed up onto the beaches," Ray said. "They get dried out and then they get picked up by the wind and blown into the deserts. And around the entire equator of Titan is nothing but dunes as far as the eye can see -- just like the dunes of the Arabian desert. But they're made out of little chips of water covered in hydrocarbon goo."

The Huygens probe survived for about three and a half hours. Over the next 13 years, Cassini passed over the moon more than 120 times, observing it and using it as a tool to change its trajectory around Saturn. The flybys helped scientists learn more about the structure of the moon, its atmosphere and how its features change during the seasons.

"So, we've our reconnaissance now," Ray said. "We haven't even mapped Titan at the highest resolutions, except for maybe you know 50 percent."

There's more to learn about the moon, but scientists at NASA have to figure out whether, when and how they can manage to go back.

And before we return to Titan, Cassini will use the moon one last time. In September, it’ll slingshot around Titan shifting its trajectory to point directly at Saturn, where it'll burn up in what's being called its "grand finale."