In this April 24, 2020, file photo, a Massachusetts Bay Transportation Authority Green Line trolley runs along Commonwealth Avenue in Boston. Credit: Michael Dwyer / AP

BOSTON — A train on the Green Line in Boston crashed into another train from behind on Friday, injuring more than 20 people, authorities said.

The Boston Fire Department said in a tweet 23 people were taken to hospitals with injuries, none of which were life-threatening.

The cause of the crash was not immediately known, Massachusetts Bay Transit Authority General Manager Steve Poftak said at a press conference.

“We will obviously get to the bottom of this. This should not happen and we will find out why it happened and will ensure that it won’t happen again,” he said Friday evening.

The trains crashed on the Green Line track running along Commonwealth Avenue west of Boston University.

The MBTA said in a tweet around 6:15 p.m. that train service was suspended on part of the B branch of the Green Line because of an accident.

Photos posted by the fire department show the front of one of the trains crushed and dented with the glass on the windshield cracked.