Media playback is unsupported on your device Media caption Lead researcher Cooper Downs explains how the comet and its "wiggly tail" gave clues about the Sun's violent atmosphere. Footage and interview: Science Magazine

A comet's close encounter with the Sun has given scientists a look at a solar region that has never been visited by spacecraft.

In 2011, comet Lovejoy hurtled deep into the Sun's violent atmosphere - an area called the solar corona.

Telescope images have revealed how the comet's tail was pulled about by an intense magnetic field, allowing scientists to characterise this force for the first time.

The study is published in Science.

Dr Karel Schrijver, from the Lockheed Martin Advanced Technology Center in California, said: "The comet goes through an area of the solar atmosphere that we can't really observe.

"We can't go there because our satellites would melt, and we can't see it because there is not much light coming from it. But comet Lovejoy gave us a means to access a part of the solar atmosphere and solar magnetic field that we cannot get into in any other way."

Dancing tail

Comet Lovejoy, which is named after the Australian astronomer who discovered it, ploughed into the Sun's atmosphere on 15 December 2011.

With an advance knowledge of its orbit, scientists trained Nasa's Solar Dynamics Observatory and twin Stereo orbiters, as well as Japan's Hinode spacecraft to capture the event.

Hurtling towards the Sun at 600km (400 miles) a second, the comet appears as a fast-moving, bright speck followed by a long glowing tail.

Image caption Three solar missions trained their telescopes on the comet as it approached the Sun

The images reveal the comet getting increasingly bright as it enters the solar corona, where it encounters temperatures of millions of degrees Celsius. Its tail also begins to move.

Dr Schrijver explains: "The tail is not following the comet's head perfectly as we would expect it to follow... its tail gets locked onto the Sun's magnetic field, and gets flicked back and forth."

By studying the comet's movements, the researchers have been able to find out more about the properties of the magnetic field for the first time.

This, they said, was key.

Comets Comets are icy objects that release gas and dust as they orbit the Sun

A comet's distinctive tail is caused by solar radiation and a stream of charged particles called the solar wind

It is thought that they are material leftover from the formation of the outer planets

Another theory is that they formed outside our solar system Did comets bring water to Earth?

The Sun's magnetic field drives the strong solar winds and explosions that occur in the solar corona.

These violent events can blast out particles into space and cause "space weather", which can damage satellites and telecommunications infrastructure.

Currently, scientists are using computer models to try and understand the Sun's atmosphere and its magnetic field, but said that the data from comet Lovejoy would help them to improve this process.

New sun-grazer

After comet Lovejoy made its close approach, the scientists were surprised to see the ball of ice and dust survived, re-emerging on the other side of the Sun.

It's the first one we have seen that was large enough to survive close passage Dr Karel Schrijver, Lockheed Martin Advanced Technology Center

Two days later, though, it disintegrated.

Dr Schrijver said: "There have been about 1,600 Sun-grazing comets observed. But all of them vanished and none came out. It's the first one we have seen that was large enough to survive close passage - although not for very long."

Solar physicists are hoping for another attempt to capture another Sun-skimming comet later in 2013.

Comet Ison, which has been called a potential "comet of the Century" because of its size and orbit, will pass by the Earth at the end of the year, before making its way towards the Sun.