Lava flowing from a volcano on La Palma, one of the Canary Islands, reached the sea on Tuesday night.
The Spanish Institute of Oceanography said the lava, which has a temperature of around 1,000 degrees Celsius, reached the sea on the Spanish island's west coast at around 11 pm local time after 10 days of eruption.
Upon reaching the water the lava created "an impressive deposit 50 metres high" in less than 45 minutes, an Institute of Oceanography team observing the event from a boat said, as quoted by El Pais newspaper.
"The lava has reached the sea. If you are outdoors, find a safe place to take shelter," the Canary Islands emergency services tweeted.
The flow destroyed banana plantations and large greenhouses near the coast on its way to the sea. The plastic tarpaulins and artificial fertilizer stored there caught fire, images broadcast on TV showed.
As toxic fumes were released, some people had to be evacuated from nearby houses, the newspaper La Vanguardia reported.
Since toxic gases laced with hydrochloric acid can also form when the lava comes into contact with the salty seawater, a curfew was maintained for four nearby districts with a total of about 300 inhabitants. People were told to keep windows and doors closed.
Local media reported that the contact between the lava and the salty water created black smoke which was blowing inland due to strong winds.
The volcanic island of La Palma was declared a disaster area earlier on Tuesday.
The government in Madrid also provided 10.5 million euros (12.3 million dollars) in emergency aid for those affected on the island.
So far, nearly 600 buildings have been burned and flattened by the blazing hot mass. The number of evacuees dropped slightly to 5,600 after some residents were allowed back into their homes.
According to estimates by the regional government, the damage amounts to several hundred million euros.
Air traffic with the island was still suspended. The only alternative was ferries to the larger neighbouring island of Tenerife. However, long waiting times were reported.
The volcano in the Cumbre Vieja mountain range in the south of the island off the west coast of Africa had erupted on September 19 for the first time in 50 years.
Even volcanologists could not forecast how long it would remain active. It could take weeks or even months.