MBTA police caught a Jamaica Plain man and charged him for holding onto the exterior of an Orange Line train as it pulled into Back Bay Station.

At about 8:15 p.m. on Tuesday, surveillance videos showed the suspect and another man grabbing onto the train’s roof guard and lifting their feet up. They hung on to the moving train for a few seconds and jumped back onto the platform before the train left the station.

T detectives identified one of the suspects as 18-year-old Jonathan Lopez and charged him with riding upon a train other than paying a fare, train surfing and disorderly conduct on Wednesday.

Lopez was arraigned in Boston Municipal Court. The T put out a harsh statement, saying they will not tolerate this extremely dangerous behavior. They said they would identify, locate and arrest anyone performing such danger and criminal stunts.