MADRID - A commuter train crashed into a buffer in Barcelona’s Francia terminus on Friday morning, injuring at least 54 people, one of them seriously, emergency services said on Friday.

The force of the crash crumpled the front of the train against the buffer and detached a sheet of metal.

Twenty of the injured, including the driver, were taken to a hospital, emergency services said, while paramedics treated others on stretchers on the platform. They had previously given the number of injured as 39.

WATCH: At least 54 injured in Spain commuter train crash

Many of the passengers were already standing, ready to get off, when the train crashed, the newspaper La Vanguardia reported.

The train was coming from the village of Sant Vicenc de Calders in the province of Tarragona on the R2 line of the Rodalies commuter rail service, emergency services said.

The state-run railway company Adif said an investigation had been opened.