Surveillance video captured tense moments at a SEPTA station as police tased a man who was walking on the train tracks.

The unidentified man, who police say was having a mental breakdown, was caught on camera walking on the tracks at the Jefferson Regional Rail Station Monday morning. When a SEPTA police officer approached him he jumped onto the divider between the tracks.

"We worked very quickly because being in a track area is a dangerous area to be in," said SEPTA Police Chief Thomas Nestel.

As the man continued to walk on the divider, the officer used his taser on him. The man stopped and struggled to keep his balance but continued walking on the divider.

The video shows the officer shoot the man with the taser a second time causing him to fall back onto the tracks. The man remained on the ground for a few moments while kicking his legs as other officers responded to the area to try and control him.

The man then got up again and ran down the tracks. Police were able to finally apprehend him and get him to safety. He was taken to a nearby hospital for a psychiatric evaluation.

SEPTA Police are conducting an internal investigation to ensure the officers involved followed proper protocol.