It was a year of endings and beginnings: the plucky Cassini spacecraft's 13-year-long mission reached its finale, while the fledgling field of gravitational wave astronomy bagged the catastrophic collision of two dead stars.

BBC News looks back on eight of the biggest science and environment stories of 2017.

Star crash

Image copyright PA Image caption Artist's impression of two neutron stars colliding

In 2017, scientists detected Einstein's gravitational waves from a new source - the collision of two dead stars, or neutron stars. The first direct detection of these waves was announced in 2016, when the Advanced LIGO laboratories described the warping of space from the merger of two distant black holes. The result was hailed as the starting point for a new branch of astronomy, using gravitational waves to collect data about distant phenomena.

Telescopes from all over the world captured details of the neutron star merger as it unfolded. The outburst took place in a galaxy located roughly a thousand billion, billion km away in the Constellation Hydra. Some of the facts about these cataclysmic events are staggering. For example, neutron stars are so dense that a teaspoonful would weigh a billion tonnes. The team was also able to confirm that these collisions lead to the production of the gold and platinum that exists in the Universe.

Cassini's final bow

Image copyright NASA/JPL-CALTECH Image caption Artwork: Cassini ran the narrow gap between the top of Saturn's atmosphere and the rings

The Cassini spacecraft arrived in the Saturn system in 2004. In the 13 years it was operational it transformed our understanding of the ringed planet and its moons. It discovered geysers spewing water-ice out into space from a sub-surface ocean on the icy satellite of Enceladus, spied seas and lakes of methane on Saturn's biggest moon Titan and watched as a giant storm encircled Saturn.

But with its fuel tanks running low, Nasa decided to destroy the satellite in Saturn's clouds rather than see it collide with a potential target in the search for life, such as Enceladus, and contaminate it with terrestrial microbes. On 15 September, Cassini hurtled into the giant planet's atmosphere and was torn apart. But it still managed to return data to Earth from its dive towards destruction.

Paris pull-out

Image copyright EPA

While he was on the campaign trail, Donald Trump said he would "cancel" the Paris climate agreement, taking the US out of the deal. But after winning the US election in November of that year, he made few public pronouncements on the topic of climate change. Reports emerged that Mr Trump's advisers were split on the issue, prompting some commentators to wonder whether the President might be convinced to stay in the process.

However, on 1 June, President Trump held a press conference in the White House's Rose Garden to announce America's withdrawal. Mr Trump said: "In order to fulfil my solemn duty to protect America and its citizens, the United States will withdraw from the Paris climate accord... but begin negotiations to re-enter either the Paris accord or a really entirely new transaction on terms that are fair to the United States."

As expected, the reaction from Democrats and other world leaders was damning. Former US President Barack Obama accused the Trump administration of "rejecting the future", while former Secretary of State John Kerry called the decision a "gross abdication of leadership".

Multiple "Earths"

Image copyright Nature Image caption Artwork: It's the largest number of Earth-sized planets ever found orbiting the same star

Of the 3,500 planets now documented to exist beyond our Solar System, some are pretty weird. For starters, there's J1407b, a distant world with rings that are 200 times larger than the ones around Saturn.

But this year, astronomers discovered a planetary system with seven Earth-sized planets. What's more, these worlds seem to be locked in a strange "resonance" as they orbit their host star. Intriguingly, three of the planets are in the habitable zone, where water can remain liquid on the surface. And where there's water, there is at least a chance for life.

Recent relative

Image copyright Philipp Gunz/MPI EVA Leipzig Image caption A reconstruction of the earliest known Homo sapiens skull based on scans of multiple original fossils

In July, researchers unveiled fossils of five early humans found in North Africa that showed our species - Homo sapiens - emerged at least 100,000 years earlier than previously recognised. The finds suggested that our species did not evolve in a single "cradle" in East Africa. Instead, modern humans may have been evolving in the same direction all over the continent.

And there was more big news in human evolution this year. When, in 2015, scientists unveiled the remains of 15 partial skeletons belonging to a new species of human, it made headlines around the world. At the time, researchers had been unable to say for sure how old the specimens of Homo naledi were, but some primitive traits suggested they could be as much as three million years in age.

This year, team leader Lee Berger announced the remains were just 200,000-300,000 years old. The findings suggested that far from being an ancestor of present-day people, Homo naledi may even have encountered very early members of our own species - Homo sapiens.

Dark skies

Image copyright Getty Images

On 21 August, a giant shadow cast by the Moon swept across America, marking the first total solar eclipse since the country's founding in 1776 where totality made exclusive landfall in the US. It was also 99 years since a solar eclipse had crossed from the west to the east coast.

Millions of people gathered along the eclipse's path to witness the rare astronomical event.

Media playback is unsupported on your device Media caption Watch: The US witnesses the 'diamond ring' effect

And what an awesome event it was. Reporting from Madras, Oregon, the BBC's Pallab Ghosh said: "You can see that it's quarter past 10 in the morning, but it seems like night-time. We're just a few seconds away from the total eclipse... it looks like a smiley face in the sky."

After totality had passed, he added: "I got goosebumps; it just feels like a completely dream-like state."

Visitor from beyond

Image copyright ESO/M. Kornmesser Image caption Artwork: 'Oumuamua is now fading from the view of telescopes

Though scientists had been predicting for years that we would be visited by an asteroid from interstellar space, 2017 was the first time we spotted one. Discovered by a team using Hawaii's Pan-Starrs telescope in October, they were soon sure that the object's speed and trajectory indicated an origin outside our Solar System. Named 'Oumuamua, after the Hawaiian for "a messenger from afar arriving first", the object quickly became the subject of an observing campaign with some of the most powerful telescopes in the world.

In many respects, it turned out to be not dissimilar to objects known from the furthest reaches of our Solar System - so-called Kuiper Belt objects (KBOs) - complete with a reddish hue likely resulting from irradiation by cosmic rays over millions of years. One aspect of this cosmic wanderer wasn't so familiar, however: it's shape. Although the investigations are ongoing, 'Oumuamua seemed to be 10 times longer than it was wide, making it much more elongated than anything else in our Solar System.

Giant iceberg

Image copyright Copernicus Sentinel (2017) ESA/Andrew Flemming Image caption Europe's Sentinel-1 satellite-radar system confirmed the calving event

One of the biggest icebergs ever recorded broke away from Antarctica's Larsen C ice shelf in July. But scientists had been following the development of a large crack for upwards of a decade. The giant block was estimated to cover an area of roughly 6,000 sq km - about a quarter the size of Wales.

The calving of bergs at the forward edge of the shelf is a very natural behaviour. However, scientists think that Larsen C is now at its smallest extent since the end of the last Ice Age, around 11,700 years ago. Future studies will be needed to understand how the shelf is responding to a warming climate.