Wind-whipped wildfires have spread across parts of Spain as a historic heatwave hit Europe, buckling rail tracks and forcing schools to close.

The mercury rose to over 40C as Germany, Poland and Czech Republic recorded their highest temperatures for June on Wednesday. France, Belguim and Switzerland could also see their records toppled later this week.

Hundreds of firefighters are battling wildfires in Catalonia, which the regional government described as the worst in 20 years.

At least 4,000 hectares of forest has been destroyed in the Tarragona province, but officials fear that it could spread across 20,000 hectares. Thirty people have been evacuated and five roads have been closed.

It came as temperatures hit 44C in northern Spain. A total of 11 provinces across the country are set to experience temperatures above 40C over the next few days.

Wildfires sweep Spain in historic Europe heatwave: In pictures Show all 10 1 /10 Wildfires sweep Spain in historic Europe heatwave: In pictures Wildfires sweep Spain in historic Europe heatwave: In pictures A firefighter tackles a forest fire by the River Ebre in northern Spain on 27 June AFP/Getty Wildfires sweep Spain in historic Europe heatwave: In pictures A forest fire rages near Tarragona, Spain on 27 June Reuters Wildfires sweep Spain in historic Europe heatwave: In pictures Helicopters fight to extinguish a forest fire in Catalonia, Spain on 27 June EPA Wildfires sweep Spain in historic Europe heatwave: In pictures Fire and smoke rise from a forest fire by a house in Tarragona, Spain on 27 June EPA Wildfires sweep Spain in historic Europe heatwave: In pictures Helicopters drop water on a forest fire in Catalonia, Spain on 27 June Reuters Wildfires sweep Spain in historic Europe heatwave: In pictures Smoke bellows from a forest fire in Tarragona, Spain on 27 June EPA Wildfires sweep Spain in historic Europe heatwave: In pictures The landscape is scorched after a forest fire in Tarragona, Spain on 27 June AP Wildfires sweep Spain in historic Europe heatwave: In pictures The landscape is scorched after a forest fire in Tarragona, Spain on 27 June AP Wildfires sweep Spain in historic Europe heatwave: In pictures Helicopters fight to extinguish a forest fire in Catalonia, Spain on 27 June EPA Wildfires sweep Spain in historic Europe heatwave: In pictures A firefighter works to extinguish a forest fire near Flix in Catalonia on 27 June AFP/Getty

The heat is expected to rise even further over the next three days as a plume of hot air from the Sahara engulfs the continent.

In Germany, officials imposed a 60 mph speed limit along stretches of the Saxony-Anhalt autobahn as the road surface began to deteriorate. In the capital, three lanes of the Berlin ring road were temporarily closed due to the extreme heat.

On the north coast, the rail tracks buckled on a popular tourist route near the Baltic Sea and in Brandenburg, a man was cautioned by police after he was spotted riding his scooter naked.

A forest fire burns in Tarragona, Catalonia, as temperatures continue to soar across Europe (EPA)

Germany recorded its hottest ever June temperature of 38.6C in Coschen, near the Polish border, on Wednesday.

Meanwhile, France announced 50 schools just south of Paris would be closed on Thursday due to the soaring temperatures.

National exams on Thursday and Friday have also been postponed after education minister Jean-Michel Blanquer deemed it would be too hot.

France’s national forecaster Meteo issued an orange alert, the second highest level of weather warning. The agency has predicted highs of 45C for the towns of Nimes and Carpentras on Friday.

To combat air pollution exacerbated by the heat, authorities in Paris, Lyon, Strasbourg and Marseille banned older cars from entering their city centres.

On beaches in southern France, three swimmers died in separate incidents as temperatures soared to over 40C on Wednesday.

One man in his 70s is suspected of dying of “thermic shock” after experiencing cardiac arrest in calm water at a beach in Marseillan.

A 62-year-old woman and a 75-year-old man both died at beaches in Montpellier in similar circumstances.

Jerome Saloman, France’s director general of health, said: "Calls to the emergency services are on the rise nationwide. We are seeing the beginning of a clear impact of the heatwave. For us the worst is still to come."

In Italy, the Ministry of Health issued its maximum “red alert” warning for Rome, Florence, Perugia, Bolzano, Brescia and Rieti on Thursday with temperatures expected to top 40C.

A 72-year-old homeless Romanian man was found dead near Milan's central train station. Officials believe the heat may have been a factor in his death.

Scientists said heatwaves in Europe are becoming more frequent, linking the intense temperatures to climate change.

Europe's five hottest summers since 1500 have all been in the 21st Century, according to a climatology experts at the Potsdam Institute in Germany.

Stefan Rahmstorf said “monthly heat records all over the globe occur five times as often today as they would in a stable climate.”

Support free-thinking journalism and attend Independent events

"An increase in heatwaves is one of the clearest impacts of climate change," said Hannah Cloke, a professor at the University of Reading. Killer heat events of this kind will become even more widespread by the middle of the century in Europe, but this outlook could get worse unless action is taken to curb future greenhouse gas emissions."

In the UK, highs of 31C could be seen for eastern parts of England this weekend, while temperatures will be in the upper 20s for revellers at the Glastonbury Festival.

However, unsettled weather is expected to move in from the Atlantic on Sunday.