The New Zealand city of Dunedin is in shock and mourning after 19-year-old student was crushed to death in a freak accident at a house party attended by hundreds of people.

Sophia Crestani died when dozens of people became caught in a pile-up on a stairwell at a student house just before midnight on Saturday.

One witness said the pile-up happened by accident as people walking up the stairs collided with people going down.

"They started to fall backwards and when the people at the top started falling it was kind of like dominoes – everyone went down and the people at the bottom of the stairs just ended up in a pile of people," he told Stuff.

In all, around 50 people were caught in a pile about a metre high, and while some struggled to free those trapped, more people began to force their way into the party.

"People were struggling and instead of helping people were way more interested in trying to party," the witness said.

Ms Crestani was at the bottom of the pile, and like several others, appeared to be unconscious.

She was carried across the road where police and paramedics unsuccessfully tried to resuscitate her.

© Stuff/Hamish McNeilly Stray shoes litter the gutter outside the Dunedin home where a student was crushed to death.

The party was the last event scheduled at the house, nicknamed "The Manor", before the University of Otago was due to take over the lease.

Ms Crestani's former school principal described her as "well and friendly".

"She was a cheerful, positive and personable young woman," Queen Margaret College principal Jayne-Ann Young said.

"She was an enthusiastic spirit with a creative flair."

Two others were injured in the crush.