Beautiful swirls of green and red lights appeared in the sky over Whitehorse, a town in the Canadian territory of Yukon, on the night of 3 September. The lights were caused by a whip-like solar filament, ejected as a Coronal Mass Ejection (CME). The phenomenon did not connect with the Earth directly but glanced off the planet's magnetic environment, or magnetosphere.

The CME erupted on the surface of the Sun on 31 August and travelled towards Earth at a speed of more than 900 miles per second, according to NASA. In March 2010, a solar filament loop that erupted on the Sun's surface was as large as the circumference of the Earth.

The filament touched the magnetosphere a mere three days later - the distance between the planet and the Sun is roughly 149,785,000km - causing phenomenon called the Aurora Borealis (also known as the Northern Lights) to appear over Whitehorse.

Auroras are actually energy released in the form of colorful lights and are seen in skies at dusk.

A solar filament, also called solar prominence, usually occurs in the form of loops, originating from the Sun's surface and extending outwards into the Sun's hot outer atmosphere, which is called the corona. The loop consists of electrically charged hydrogen and helium particles, forming the plasma material, but is not intended for bursting outside like a solar flare or sun storm, which releases radiation directed towards Earth. However, instabilities in the magnetic field can cause the filament to shoot plasma towards Earth's magnetic environment.

"The prominence (solar filament) plasma flows along a tangled and twisted structure of magnetic fields generated by the sun's internal dynamo. An erupting prominence occurs when such a structure becomes unstable and bursts outward, releasing the plasma," NASA explains.

The exact reason and process involved in the formation of these prominences is yet to be determined. The CME from any such explosion, be it a filament or flare, on the Sun, often results in appearance of auroras.

NASA's Solar Dynamics Observatory (SDO) spacecraft recorded a flare from a large sunspot called AR1515 on 2 July that caused such auroras. Another powerful Sun storm that erupted from a giant Sunspot in Active Region 1520 on 6 July and peaked on 12 July, caused the Northern Lights to appear over northern US regions.

The SDO spacecraft has captured a few photos of the solar filament that happened last month. The data suggests the filament occurred in the lower left corner of the sun.

Check out these photos of the solar filament and the Northern Lights it caused