Over three hundred people were injured, two seriously, after a wooden boardwalk collapsed during a seaside music festival in northwest Spain late Sunday.

Dramatic video provided by eyewitnesses and local TV crews shows emergency crews scrambling to free those trapped after a section of wooden jetty collapsed in the city of Vigo. Screams could be heard as people tried to climb out of the rubble.

A total of 316 people were hurt in the incident that took place around midnight (around 6 p.m. ET), a spokesperson for the Galicia health service told NBC News. Nine were taken to hospital — two were listed in serious condition.

The platform was packed with many young people watching a performance at the closing event of a three-day festival when the boardwalk gave way.

The wooden boards cracked along a central section, about 130 feet long, and people slid down into the sea below, emergency services said. Personal effects, such as mobile phones and handbags, were left scattered on the ground.

Vigo's mayor Abel Caballero Tweeted the wounded were being evacuated to the city's hospitals and firefighters continued to work in the collapse zone.

A woman who was on the pier when it collapsed said the concert had just begun and the crowd was jumping.

"Suddenly we heard a boom and all the wood collapsed to the floor, everyone had fallen, everyone was on the floor, crushed, and so many injured," another woman who witnessed the incident told local station RTVE.

Pin shows location of Vigo, Spain. Google Maps

It's not clear why the platform collapsed, but Caballero said there will be an investigation launched into what caused the incident.

The president of the Vigo port authority, Enrique Cesar Lopez Veiga, said he suspects there was a structural problem in the boardwalk, which is supported by concrete pillars.

He told a local radio station that the boardwalk probably collapsed "because of excessive weight" on it.

The popular annual festival features music and urban sports like skateboarding.