MADRID -- A stampede in an arena where thousands of people were attending a Halloween dance party killed three women and critically injured two others early 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, Deputy Mayor Miguel Angel Villanueva said.

One witness said the stampede left partygoers 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, emergency services spokesman Fernando Prado said.

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 partygoers 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.

In Germany, 19 people were crushed to death in a stampede and 342 others were injured two years ago at a techno party in Duisburg.

STATEMENT FROM STEVE AOKI:

After my performance last night at Thriller Music Park at the Madrid Arena in Spain, I was devastated to hear that three people had died during a crowd rush at one of the exits. The safety of my fans has always been my top priority and had I known that there was any distress putting people in jeopardy within the venue I would have ended my show immediately. My show in Bilbao, Spain tonight will be cancelled out of respect for those who lost their lives and those who are injured. I would like to express my deepest condolences and heart felt prayers to the families and loved ones during this difficult time.

Also on HuffPost:

Loading Slideshow...
  • Vladimir Putin

    It's not that hard to get the Vladimir Putin look, all you have to do is think ultimate Hollywood buff - or action movie villain; Both would work. Planning to go as Russia's president for Halloween? What you need: 1. Rifle, horse, hang-glider, puppy 2. Nicely-waxed smooth chest 3. Cross pendant 4. Weighted-knuckle gloves 5. Pants of choice <em>Caption: In this Sept. 2010 photo released on Saturday, Oct. 30, 2010, then Russian Prime Minister Vladimir Putin carries a hunting rifle during his trip in Ubsunur Hollow in the Siberian Tyva region (also referred to as Tuva), on the border with Mongolia, Russia. (AP Photo/RIA Novosti, Dmitry Astakhov, Government Press Service, file)</em>

  • Evo Morales

    Evo Morales really likes his colorful ponchos. He likes them so much, he makes his guests, whether Dmitry Medvedev, Sean Penn, or Mahmoud Ahmadinejad, wear them too. So if you're planning to go as Bolivia's merry president for Halloween, all you need is: 1. Brightly-colored Poncho 2. Hat of choice 3. Garland of flowers, fruits, vegetables, etc 4. A big smile <em>Caption: Bolivian president Evo Morales wears a red poncho, a traditional indigenous wearing used in former guerrilla village of Achacachi, some 100 kilometers north of La Paz on Tuesday, Jan. 23, 2007. (AP Photo/Dado Galdieri)</em>

  • Fidel Castro

    Despite being old and ailing, Fidel Castro is still seen by many, including Hugo Chavez, as one of the "<a href="http://www.nbcmiami.com/the-scene/fashion/FIDELIAN_FASHION.html">best dressed world leaders</a>." Planning to go as Cuban revolutionary Fidel Castro? All you need is: 1. Classic green military uniform 2. Peaked cap 3. Polished black boots 4. Bushy unkempt beard 5. Cuban cigar

  • Moammar Gaddafi

    We shouldn't speak ill of the dead, but it is Halloween, and if you plan to go as the former Libyan dictator, all you need is: 1. A few hundred yards of fine silk 2. Tangly black wig 3. Unkempt goatee 4. Female bodyguards 5. A towering level of self-confidence <em>Caption: Libyan leader Moamer Kadhafi smiles during the closing session of the Community of Sahel-Saharan States (CEN-SAD) summit in Sabratha, west of Tripoli, on May 30, 2009. (AFP PHOTO/MAHMUD TURKIA) </em>

  • Yulia Tymoshenko

    She may have fallen from grace, but Ukraine's former Prime Minister Yulia Tymoshenko and her gleaming blonde braided crown, was quite the fashion icon once upon a time. Planning to go as the jailed former premier? What you need is: 1. Long hair braided and wrapped all the way across the head, in the traditional Ukrainian fashion, not that of Frieda Kalho. 2. Any dress with outlandish collars and heavy shoulder pads 3. Spectacles or wire-rimmed glasses <em>Caption: In this Monday, April 4, 2011, file photo, former Ukrainian Prime Minister and main opposition leader Yulia Tymoshenko is pictured in her headquarters in Kiev, Ukraine. (AP Photo / Efrem Lukatsky, file)</em>

  • Prince Harry

    To go as Prince Harry this Halloween, is easy: All you have to do is surround yourself with girls and wear nothing but a smile. <em>Caption: Britain's Prince Harry watches track cycling during the 2012 Summer Olympics, in this file photo dated Thursday, Aug. 2, 2012, in London. (AP Photo/Matt Rourke, File)</em>

  • Kim Jong Un

    Planning to go as new North Korean leader Kim Jong Un? Here's what you need: 1. Distinctive cropped hair-style with shaved back and sides 2. A drab buttoned down tunic and matching pants 3. Red lapel pin bearing pictures of dead North Korean leaders <em>Caption: In this Sunday, April 15, 2012, file photo, North Korean leader Kim Jong Un waves from a balcony at the end of a mass military parade in Pyongyang's Kim Il Sung Square. (AP Photo/David Guttenfelder, File)</em>