Europe's Rosetta spacecraft recently beamed back an amazing photo of its comet taken during a risky, close flyby of the dusty cosmic body.

Rosetta's flyby took it from the shady side of Comet 67P/Churyumov–Gerasimenko towards sunlight, putting the sun directly behind the spacecraft and showing scientists how reflective the comet's surface was. The image, taken when the Rosetta spacecraft was 9.5 miles from Comet 67P/C-G's surface puts the celestial body's dusty, craggy face on display.

"The data acquired during Rosetta's close flyby will provide incredible new details of the comet's surface and near-coma environment, complementing that collected earlier in the mission while on bound orbits," European Space Agency officials said in a blog about the close flyby. [See more photos of the comet from Rosetta]

Rosetta's flyby brought it about 3.7 miles from the comet's face on Feb. 14, but not all went according to plan during the orbit.

The comet has far more dust and gas coming from its surface as it draws closer to the sun. The team discovered that this created drag on the Rosetta spacecraft, and making it difficult for the probe to view the stars it needed for navigation. Rosetta started tracking "false stars," and even its backup star tracker stopped working, according to ESA.

But in spite of these issues, the spacecraft continued to function, snapping the new photo and collecting data for the science teams back on Earth.

"With a lot of luck, the spacecraft did not end up in 'safe mode'," Sylvain Lodiot, Rosetta spacecraft operations manager, said in the same blog post. "Although in this case we could have recovered the spacecraft and resumed operations as planned, the science instruments would have automatically switched off in the meantime. By the time they had been switched back on, we would have been relatively far away from the comet again."

Rosetta arrived at Comet 67P-C-G in 2014. The spacecraft is expected to function in orbit around the comet through the rest of 2015, following the cosmic body as its makes its close pass of the sun later this year.

In November 2014, mission controllers deployed the Philae lander from Rosetta to the comet's surface. Philae made a bumpy landing, and officials aren't yet sure where the probe ended up on the comet. The lander did spend several days gathering data before the spacecraft's battery died. As more sunlight falls on the surface, controllers are hoping Philae's solar panels will collect enough energy to help the lander start functioning again.