BARCELONA, Spain -- More than 20,000 concertgoers were forced to evacuate a music festival in Barcelona over the weekend after flames engulfed the event's stage.

The fire on Saturday night consumed the large outdoor stage at the Tomorrowland electronic music festival held at Barcelona's Parc de Can Zam. Twelve firefighting units needed around an hour to extinguish the flames just before midnight.

Firefighters said they were investigating the cause. Organizers of the festival said the stage caught fire "due to a technical malfunction."

Get Breaking News Delivered to Your Inbox

"Thanks to the professional intervention of the authorities, all 22.000 visitors were evacuated safely and without reports of injuries," organizers said in a statement. "Authorities will follow up and continue the investigation with the local Spanish organizer of UNIT."

Smoke is seen rising from flames engulfing the stage after a fire broke out at Tomorrowland Unite Spain festival in Barcelona, Spain July 29, 2017, in this still image from a video obtained from social media. Alex Prim Lopez via Reuters

Barcelona firefighters said there were no serious injuries during the evacuation but the event's private security treated 20 people for minor injuries or anxiety.

Video images show the fire starting at the top of a tall temporary structure erected on the stage where a large screen showed a performer signing. The towering flames quickly spread until they engulfed the entire stage.

In a statement, regional authorities said the fire "completely destroyed the stage" and that its charred remains "run the risk of collapsing."

The festival in Barcelona was one of several offshoots of a main Tomorrowland festival in Belgium. Organizers said the Barcelona event was canceled following the fire.