A young man who filmed himself riding on the back of a subway train is expressing remorse after city officials slammed the stunt as “stupid” and “dangerous.”

“My stunt was very dangerous and I discourage anyone from even thinking about putting their lives in danger to try something like this,” the university student said in a statement to CTV News Toronto Tuesday, a day after video of his ride went viral.

He refused to comment further on the incident.

The video was posted to Instagram Monday by a Toronto hip hop and entertainment account and racked up more than 40,000 views before being taken down in the evening.

In the video, the rider films himself hanging onto the back of a subway train as it speeds through a tunnel and at one point turns the camera to show curious passengers inside the train looking his way.

In the video, he screams into the camera with a big smile, “I’m on the back of a train! Woooo!”

It’s not clear exactly when the stunt took place. The rider initially told CP24 Monday that it did not happen on TTC property. However the TTC said Tuesday that there’s no doubt the video was shot on one of their trains.

The TTC has since been in touch with the rider after he called to inquire about possible charges and fines in connection with the incident. The TTC said transit enforcement officers plan to meet with him this week.

“In addition to a vehicle moving at 50 to 60 kilometres per hour, there are 600 volts of electricity running through that third rail,” TTC Spokesperson Stuart Green said Tuesday. “Even if he had stepped off and touched that third rail it could have been fatal.”

He said the move could have resulted in death or serious injury for the rider, but also a possible dangerous situation for staff and customers.

Asked about the incident Tuesday, Mayor John Tory weighed in, calling the man’s actions “stupid.”

“You can't legislate or fine against stupidity and hopefully this young man by coming forward indicates that he knows what he did was extremely ill-advised and irresponsible,” Tory said.

For his part, Green said, the man “seems incredibly remorseful and a bit embarrassed by this.”

It’s not yet clear exactly what sort of fine he will face. The penalty for riding on the outside of a TTC car could be as high as $425.

This isn’t the first time that people have been caught pulling stunts on TTC property. In 2016, another young man was hit with a fine of $425 after filming a video making fun of Pokemoin GO in which he walked onto subway tracks.

And in another incident in June last year, a 13-year-old girl was escorted off of TTC property after she was spotted lounging on top of a parked subway train at Davisville Station.