Image copyright IDDP Image caption Steam from the deep well could provide an important source of energy

An attempt to drill into the heart of a volcano in the south-west of Iceland is now complete.

Geologists have penetrated 4,659m down, creating the deepest-ever volcanic borehole.

Their aim is to tap into the steam at the bottom of the well to provide a source of geothermal energy.

They recorded temperatures of 427C, but believe the hole will get hotter when they widen it in the coming months.

The Iceland Deep Drilling Project (IDDP) team also collected 21m of cores, which will now be analysed.

Gudmundur Omar Fridleifsson, from Icelandic energy company HS Orka, the lead funder of the scheme, said: "We got some beautiful samples - everyone is very pleased."

Media playback is unsupported on your device Media caption BBC News visited the drilling site in December as it neared completion

The project is located on Iceland's Reykjanes peninsula, where a volcano last erupted 700 years ago.

I visited the site in December to see the huge rig, which stands out against the black lava fields. Inside a drill had been operating, almost continuously, since 11 August 2016.

The aim had been to reach a depth 5,000m, where the temperatures were expected to reach about 500C.

At this depth, molten rock mixes with water. But with the extreme heat and pressure, the water becomes "supercritical".

This means it is neither a liquid nor a gas, but it holds far more energy than either.

The idea is that when the steam is brought back to the surface and converted into electricity, it will create up to 10 times more energy as conventional geothermal wells.

As the geologists neared their 5,000m target, the drilling got more difficult, and the team decided to halt the operation once it reached 4,659m-down.

However at this depth, the scientists did find the pressure was high enough to see the supercritical steam they were expecting.

"We knew we had reached our goal, so we decided it was the right time to stop drilling. Mission accomplished," said Dr Fridleifsson.

Image copyright IDDP Image caption The team collected cores at the bottom of the borehole

Over the coming months, the next stage will be to pump cold water into the well, which will open it up.

Then they will wait for the well to warm up again. They think the temperatures could exceed 500C, which would make this the hottest borehole ever drilled.

Then the team will see whether it generates as much energy as they hope.

"We will start measuring and getting fluid chemistry from the deep samples. We have three more years to go before we conclude the mission." said Dr Fridleifsson.

The scheme also gives scientists an unprecedented look into the deepest depths of a volcano, and could help them to better understand how these systems work.

The IDDP project is funded by energy companies (HS Orka, Statoil, Landsvirkjun and Orkuveita Reykjavíkur), Orkustofnun (the National Energy Authority of Iceland), the International Continental Scientific Drilling Program (ICDP), the National Science Foundation in the US and EU Horizon 2020.

Follow Rebecca on Twitter.