Initial investigations have suggested the use of heavy machinery in areas of parched vegetation caused the sparks that developed into the largest wildfires in the recent history of France and Spain.

A fire in the Burgohondo mountain range in Ávila that burned more than 50,000 hectares of land and forced tens of thousands to evacuate began when an rock-breaking excavator caused a spark, Spanish media reported, after the arrest of a man accused of operating the machinery.

“Yes we commissioned the work, but we never knew he would use that hammer,” the head of a local livestock association told newspaper El Mundo. “It’s all in the hands of the courts now, and I can’t say anything more.”

The works were taking place without a permit and despite a ban on the use of such machinery due to the high risk of wildfires due to high heat and desiccated conditions, ultimately leading to the largest wildfire in recorded Spanish history.

A forest fire burning in Blagon, Lanton, west of Bordeaux. Photograph: Ed Jones/AFP/Getty ImagesA forest fire burning in Blagon, Lanton, west of Bordeaux. Photograph: Ed Jones/AFP/Getty Images Firefighters during a break while fighting wildfires in a forest near El Tiemblo, Ávila region, Spain, on Wednesday. Photograph: Brais Lorenzo/BloombergFirefighters during a break while fighting wildfires in a forest near El Tiemblo, Ávila region, Spain, on Wednesday. Photograph: Brais Lorenzo/Bloomberg

In France, investigators believe a record-breaking fire that burned 42,000 hectares of land in the Gironde region close to Bordeaux and forced 220,000 people to evacuate was caused by a machine that was being used to clear brush underneath a high-voltage power line.

“The fire appears to have originated at this site, where works had begun just beforehand,” the public prosecutor of Bordeaux Renaud Gaudeul told French radio.

The use of such machinery was not banned at the time, as a prohibition on all combustion and electric engines due to extreme forest fire risk came into force only afterwards.

Power utility company Enedis has confirmed that it contracted a company to clear brush in the area, but has said that the exact cause of the fire has yet to be confirmed.

European wildfires in graphics: France and Spain battle blazes as another heatwave approachesOpens in new window ]

The head of the European Union’s emergency response centre, meanwhile, said Greece and Italy are set to face a heightened wildfire risk in the ‌coming weeks, threatening further ⁠disasters even as wildfires continue to blaze in Spain and France.

Two Greek firefighters died on Wednesday after they became trapped tackling a wildfire that swept through the Rethymno area of Crete.

Gale-force winds whipped up the flames prompting the evacuation of several villages, in the latest summer wildfire to break out in southern Europe.

Firefighters in France and Spain have managed to contain the vast wildfires near Bordeaux and Madrid, at least for now, officials in the two countries said. But they warned that the battle was far from over.

Authorities in both countries are still counting the cost of the wildfires, which aside from wreaking vast destruction have caused large-scale indirect economic disruption and have triggered huge and expensive firefighting operations.

French economy minister Roland Lescure described it as an “an economic bombshell for a region that doesn’t need one” that forced over 13,000 businesses to evacuate.

Judicial authorities in France announced a crackdown on behaviour that risks starting fires after several firefighters were killed while attempting to get blazes under control.

In pictures: Spain and France battle fierce wildfiresOpens in new window ]

Two men, aged 19 and 21, were arrested for setting off fireworks in an area south of the massive Gironde wildfire, while a 33-year-old man described as a hospital porter was arrested for setting fire to bushes on the outskirts of Bordeaux while under the influence of alcohol.

A 26-year-old man is set to face trial for lighting a barbecue and smoking a cigarette in Lacanau, where 4,000 people were evacuated this week as wildfires threatened camping sites and tourist accommodation.

People who discard lit cigarette butts in forests in which the use of fire is prohibited due to high wildfire risk face one year of prison and a fine of €15,000, according to the prosecutor’s office.

“We have stepped up our criminal response to individuals who adopt extremely dangerous behaviour and who still do not realise the seriousness of their actions,” Gaudeul said.

The fire outside Bordeaux has burned down at least 240 homes, according to initial estimates, while the blaze in the Madrid region has destroyed at least 100 homes.

Between July 6th and July 27th, 162 people were arrested in France in the course of investigations into multiple wildfires across France, the office of French president Emmanuel Macron said after he convened an emergency meeting.

“Investigations are continuing in order to identify those responsible for starting the fires.”