If you ask yourself what the biggest threat to human existence is you’d probably think of nuclear war, global warming or a large-scale pandemic disease. But assuming we can overcome such challenges, are we really safe?

Living on our blue little planet seems safe until you are aware of what lurks in space. The following cosmic disasters are just a few ways humanity could be severely endangered or even wiped out. Happy reading!

1. High energy solar flare

An M-class solar flare erupts from the right side of the sun in this image from shortly before midnight EST on Jan. 12, 2015. The image blends two wavelengths of light -- 171 and 304 angstroms -- as captured by NASA's Solar Dynamics Observatory (NASA)

Our sun is not as peaceful a star as one might initially think. It creates strong magnetic fields that generate impressive sun spots, sometimes many times larger than Earth. It also ejects a stream of particles and radiation – the solar wind. If kept in check by Earth’s magnetic field, this wind can cause beautiful northern and southern lights. But when it becomes stronger, it can also influence radio communication or cause power outages.

The most powerful magnetic solar storm documented hit Earth in 1859. The incident, called the Carrington Event, caused huge interference with rather small scale electronic equipment. Such events must have happened several times in the past, too, with humans surviving.

But only in recent years have we become entirely dependent on electronic equipment. The truth is we would suffer greatly if we underestimate the dangers of a possible Carrington or even more powerful event. Even though this would not wipe out humanity instantly, it would represent an immense challenge. There would be no electricity, heating, air conditioning, GPS or Internet – food and medicines would go bad.

2. Asteroid impact

Aerial view of Barringer Crater in Arizona

We are now well aware of the dangers asteroids could pose to humanity – they are, after all, thought to have contributed to the extinction of the dinosaurs. Recent research has made us aware of the large host of space rocks in our solar system that could pose danger.

We are at the starting point of envisaging and developing systems for protecting us against some of the smaller asteroids that could strike us. But against the bigger and rarer ones we are quite helpless. While they would not always destroy Earth or even make it uninhabitable, they could wipe out humanity by causing enormous tsunamis, fires and other natural disasters.

3. Expanding sun

Conjectured illustration of the scorched Earth after the Sun has entered the red giant phase, 7 billion years from now

Where the previous cosmic dangers occur at the roll of a dice with a given probability, we know for certain that our sun will end its life in 7.72 billion years. At this point, it will throw off its outer atmosphere to form a planetary nebula, ending up as a stellar remnant known as a “white dwarf”.

But humanity will not experience these final stages. As the sun becomes older, it will become cooler and larger. By the time it becomes a stellar giant it will be big enough to engulf both Mercury and Venus. Earth might seem safe at this point, but the sun will also create an extremely strong solar wind that will slow down the Earth. As a result, in about 7.59 billion years, our planet will spiral into the outer layers of the hugely expanded dying star and melt away forever.

4. Local gamma ray burst

Artist's illustration of a bright gamma-ray burst occurring in a star-forming region. Energy from the explosion is beamed into two narrow, oppositely directed jets

Extremely powerful outbursts of energy called gamma ray bursts can be caused by binary star systems (two stars orbiting a common centre) and supernovas (exploding stars). These energy bursts are extremely powerful because they focus their energy into a narrow beam lasting no longer than seconds or minutes. The resulting radiation from one could damage and destroy our ozone layer, leaving life vulnerable to the sun’s harsh UV radiation.

Astronomers have discovered a star system – WR 104 – that could host such an event. WR 104 is about 5,200-7,500 light years away, which is not far enough to be safe. And we can only guess when the burst will happen. Luckily, there is the possibility that the beam could miss us entirely when it does.

5. Nearby supernovas

The Crab Nebula is a pulsar wind nebula associated with the 1054 supernova. It is located about 6,500 light-years from the Earth

Supernova explosions, which take place when a star has reached the end of its life, occur on average once or twice every 100 years in our Milky Way. They are more likely to occur closer to the dense centre of the Milky Way and we are about two-thirds of the way from the middle – not too bad.

So can we expect a nearby supernova anytime soon? The star Betelgeuse – a red super giant nearing the end of its life – in the constellation of Orion is just 460-650 light years away. It could become a supernova now or in the next million years. Luckily, astronomers have estimated that a supernova would need to be within at least 50 light years of us for its radiation to damage our ozone layer. So it seems this particular star shouldn’t be too much of a concern.

6. Moving stars

The Antlia Dwarf is a dynamic site featuring stars at many different stages of evolution, from young to old – it may lie within our star local group

Meanwhile, a wandering star on its path through the Milky Way might come so close to our sun that it would interact with the rocky “Oort cloud” at the edge of the solar system, which is the source of our comets. This might lead to an increased chance of a huge comet hurtling to Earth. Another roll of the dice.

The sun itself follows a path through the Milky Way that takes us through more or less dense patches of interstellar gas. Currently we are within a less dense bubble created by a supernova. The sun’s wind and solar magnetic field help create a bubble-like region surrounding our solar system – the heliosphere – which shields us from interacting with the interstellar medium. When we leave this region in 20,000 to 50,000 years (depending on current observations and models), our heliosphere could be less effective, exposing Earth. We would possibly encounter increased climate change making life more challenging for humanity – if not impossible.

And life goes on…

The end of humanity on Earth is a given. But this is not something to make us crawl under a table. It is something that we cannot change, similar to our lives having a definite start and end. This is what defines us and makes us realise that the only thing we can do is make the most of our time on Earth. Especially when we know that Earth needs a careful balance to sustain humanity.

Climate change protests around the world Show all 25 1 /25 Climate change protests around the world Climate change protests around the world People rally to promote climate protection in Rome, Italy Climate change protests around the world Hundreds of demonstrators gather in front of City Hall in Los Angeles, California EPA Climate change protests around the world People hold hands to form a human chain during a gathering called by ecologist organisations in Marseille, southern France, to protest against global warming a day ahead of the United Nations Conference on Climate Change (COP21) held in Paris Climate change protests around the world Demonstrators clash with French riot police during protests on Place de la Republique, ahead of the COP21 World Climate Change Conference 2015 in Paris, France Climate change protests around the world Demonstrators clash with French riot police during a protest on Place de la Republique ahead of the COP21 World Climate Change Conference 2015 in Paris, France Climate change protests around the world A group of people perform during a rally to promote climate protection in Rio de Janeiro, Brazil Climate change protests around the world A protester sits next to his sign that reads 'Monsanto the Devil Incorporated ' as he joined hundreds of demonstrators who gathered in front of City Hall in Los Angeles, California EPA Climate change protests around the world Environmentalists dance during a protest near the Place de la Republique after the cancellation of a planned climate march following shootings in the French capital, ahead of the World Climate Change Conference 2015 (COP21), in Paris, France Reuters Climate change protests around the world People protest next to characters dressed as wild animals during a march against climate change near the Monument to the Revolution, in Mexico City AP Climate change protests around the world Protesters carries a banner while they take part in a protest about climate change at New York City Hall steps in lower Manhattan, New York Reuters Climate change protests around the world People take part in a protest about climate change around New York City Hall at lower Manhattan, New York Reuters Climate change protests around the world People rally to promote climate protection in Piazza Castello, Turin, Italy Climate change protests around the world A woman holds a globe during a protest for the global climate day in Lugano, Switzerland Climate change protests around the world Yemenis hold banners as they participate in the Global March for Climate in the old city of Sanaía, Yemen Climate change protests around the world Protesters dressed as Santa Claus take part in a protest about climate change at New York City Hall steps in lower Manhattan, New York Reuters Climate change protests around the world People gather at the Legislative Palace in Montevideo, during the Global Climate March to demand action on climate change telling world leaders on the eve of a crunch UN summit that there is "no planet B". From Sydney to London, humid Rio to chilly New York, at least 683,000 hit the streets in 2,300 events across 175 countries at the weekend, co-organiser and campaign group Avaaz said, calling it the largest number of people to protest over climate change all at once Getty Images Climate change protests around the world Climate change protests around the world Demonstrators participate in the Global March for Climate in Athens, Greece Climate change protests around the world A man wearing a Bernie Sanders mask leads hundreds of demonstrators who marched near City Hall in Los Angeles, California EPA Climate change protests around the world Patricia Hauser joined hundreds of demonstrators who gathered in front of City Hall in Los Angeles, California Climate change protests around the world A woman holds a poster of a sick Earth as she joined hundreds of demonstrators who gathered in front of City Hall in Los Angeles, California EPA Climate change protests around the world Hundreds of demonstrators march around City Hall in Los Angeles, California EPA Climate change protests around the world A demonstrator holds cut-out of US Democratic Presidential candidate Bernie Sanders as she joined hundreds of demonstrators who gathered in front of City Hall in Los Angeles, California EPA Climate change protests around the world George Patten holds a sign that reads 'No Fracking Ever!' as he joined hundreds of demonstrators who gathered in front of City Hall in Los Angeles, California EPA Climate change protests around the world Gabrielle Sosa wears 'Rising Sea Levels' sign as she joined hundreds of demonstrators who gathered in front of City Hall in Los Angeles, California EPA

All the above scenarios harbour possible destruction, but in every instance they also offer beauty and wonder. In many cases, they produce what allowed us to be created. So rather than looking into the night sky and wondering what will kill us next, we should marvel at the depth of space, the wonders therein and the sublime nature of the universe. Be inspired by space. It offers future and meaning.