MADRID (AP) -- A stampede in an arena where thousands of people were attending a Halloween party killed three women and critically injured two on Thursday, officials said.

It happened just after 4 a.m. in a passageway within the venue leading to the central concert area at Madrid Arena, where the disco-style party with American DJ Steve Aoki was under way.

Someone set off a flare or a firework, causing the stampede that trampled the five young women, said Deputy Mayor Miguel Angel Villanueva.

One eyewitness said the stampede left party-goers piled atop one another as high as her shoulders.

"I saw a mass of people . screaming `Help, get me out of here,' with security guards tugging at them," Ana Gomez told state broadcaster TVE. "I remember seeing the face of one young man, and his expression was that of sheer terror."

Thousands of people were attending the party when the stampede occurred, leaving the victims with trauma injuries or breathing and heart failure, said emergency services spokesman Fernando Prado.

Villanueva said the venue's maximum capacity of 10,600 people had not been exceeded and that authorities decided not to evacuate the arena when the accident occurred. Most party-goers were not aware of the stampede because it was confined to the passage, he said.

Halloween has recently become a popular festivity in Spain, coinciding with the traditional feast of All Saints.

Germany also suffered a deadly stampede at a musical event two years ago. A large "Love Parade" techno-music party in Duisburg saw 19 people crushed to death and 342 injured.