Around 22,000 people have been evacuated from the Tomorrowland Unite festival in Barcelona after a fire broke out on the main stage.
No injuries have been reported, according to Spanish newspaper El Pais.
The blaze apparently broke out after a pyrotechnic element malfunctioned went wrong.
Social media images showed huge flames climbing up the side of the stage. Eyewitnesses said the stage “exploded”. The inferno was later extinguished.
The Tomorrowland Unite festival was taking place at the Can Zam Park in Santa Coloma de Gramenet on Saturday evening when the left-hand side of the stage went up in flames.
The director general of civil protection in Catalunya tweeted that 22,143 people had been evacuated from the event, but no injuries had been reported so far.
It is not yet known what the cause of the fire was, although local media reported that it appeared to be related to the pyrotechnics, and it was quickly brought under control.
DJ Steve Aoki had been due to perform on the stage at the event, which was an outpost of the Tomorrowland electronic music festival that usually takes place in Belgium.
Festivalgoers posted dramatic videos and photos of the blaze.
The line-up for the evening had also been set to include DJs Ingrosso and Afrojack.
Additional reporting by agencies