A solar flare was responsible for causing a "dazzling" aurora display above North America earlier this week.
Nasa has said the northern lights, captured by International Space Station astronaut Reid Wiseman, were a result of a giant cloud of gas from the sun colliding with Earth's magnetic field.
The cloud of gas from the sun, or a coronal mass ejection, collided with the magnetic fields on 19 August, setting off a geomagnetic storm, the space agency explained. The solar flare was released from the sun on 15 August.
"This is a kind of space weather event where the magnetic fields surrounding Earth compress and release. This oscillation is much like a spring moving back and forth, but unlike a spring, moving magnetic fields cause an unstable environment, setting charged particles moving and initiating electric currents."
The geomagnetic storm passed within a day but while it was taking place, the solar particles and magnetic fields resulted in the release of particles already trapped near Earth, causing oxygen and nitrogen molecules to release photons of light.
"The result: an aurora, and a special sight for the astronauts on board the space station."
Tweeting, the spectacle, Wiseman said: "Never in my wildest dreams did I imagine this. 10 minutes ago on the #ISS ... Unbelievable."