By Maria Sheahan and Victoria Bryan

FRANKFURT/BERLIN (Reuters) - After 12 years chasing a comet across more 6 billion km of space, European scientists will end the historic Rosetta mission by crash landing the spacecraft on the surface of the dusty, icy body at the end of the month.

Data collected by Rosetta, which has captured the public's imagination thanks in part to the European Space Agency's cartoon depictions of it and lander Philae, is helping scientists better understand how the Earth and other planets formed.

The spacecraft has managed several historic firsts, including the first time a spacecraft has orbited a comet rather than just whizzing past to snap some fly-by pictures, and the first time a probe has landed on a comet's surface.

It was also the first mission to venture beyond the main asteroid belt relying solely on solar cells for power.

After more than two years of circling comet 67P/Churyumov–Gerasimenko, collecting a treasure trove of data that will keep scientists busy for years to come, the comet's distance from the sun is nearing the point where solar power becomes too weak to operate the spacecraft and download data from its computers.

In the final hours of its controlled descent on Sept. 30, Rosetta will be able to take close-up pictures of the comet and collect data on gases closer to the surface before joining Philae and shutting down forever.

"We haven't been in those last two kilometers (to the surface) with Rosetta and we believe it's fundamental in understanding how gases and dust get from the surface out to the outer atmosphere," Matt Taylor, ESA's Rosetta project scientist, told Reuters ahead of Rosetta's end-of-mission event at ESA's Space Operations Center in Darmstadt, Germany.

"COOL SCIENCE"

Those who have worked on Rosetta say it by far exceeded their expectations by surviving the trip for as long as it did.

It successfully sent its 100 kg (220 lb) washing-machine sized lander down to the surface in November 2014 in what was considered a remarkable feat of precision space travel, even if the lander ended up bouncing and coming to rest in the shade where it could not be recharged.

Story continues

"We were going into the unknown," Paolo Ferri, head of mission operations at ESA, told Reuters. "The spacecraft really surprised us."

Rosetta has detected key organic compounds in the comet, bolstering the notion that comets delivered the chemical building blocks for life long ago to Earth and throughout the solar system.

The Rosetta mission has inspired artists as well as scientists. Electronic music composer Vangelis has produced a new album called Rosetta, with the release timed for the end of the mission.

"We knew Rosetta was going to have a big impact but didn't know it was going to be this big and that people would be that interested in it. It had all the components - a long journey, adventure, technological challenges and danger and of course, the reason we are there for: cool science!" Taylor said.

(Editing by Andrew Heavens)