NEW YORK (CBSNewYork) — A man is in custody after he jumped onto subway tracks and walked around the tunnel Thursday.

Trains were back up and running normally Thursday night, but in the middle of rush hour, the MTA had to cut power along more than two miles of subway tracks.

READ MORE: NYPD Officer Jason Rivera Fatally Shot, Officer Wilbert Mora Critically Injured Responding To Harlem Domestic Dispute

It happened around 5:30 p.m. on the B train tracks at the Herald Square station, CBS2’s Ali Bauman reports.

“He was going up and down the one side, you know, screaming at people, and then he would cross over to the other side of the tracks going downtown,” witness Mike Lordi said.

Lordi shot cell phone video f the incident. He says he watched the man step over the median and head towards the tunnel with train lights approaching.

“At one point, a subway was actually coming in on the side that he was on and we were a little bit… Everybody started getting very nervous. A couple people were screaming. Luckily, the police officers were able to wave their flashlights and get the subway car to stop before it came into the tunnel,” he said.

The MTA had to cut power to the third rail on several lines and reroute trains so police officers could walk on the tracks and look for him.

READ MORE: 'The Loss Of A Hero': New York Mourns Death Of 22-Year-Old NYPD Officer Jason Rivera

It resulted in massive delays at the peak of the evening rush.

“We were waiting here for about 45 minutes to an hour, then it took so long, so I went up to catch the J train, but then by the time I got there, the J was messed up, so I came back here. It was still clogged up, so I went back to the J train,” commuter Chris Lisi said.

Police say the suspect was roaming around underground for about an hour before officers were finally able to get him off the tracks and into custody.

“The police tried their best to get him, to coax him up. There were people who were trying to talk to him and really get down on his level, like, listen, just come talk to me. Just come up, you know we want to help you, and he wasn’t having any of it, unfortunately,” Lordi said.

“New York City life, everybody does something stupid, everybody else gotta suffer,” Lisi said.

MORE NEWS: Lashawn McNeil, Suspect In Deadly Harlem Police Shooting, Was On Probation, Had 5 Prior Arrests

The suspect was sent to a local hospital for a mental evaluation. Charges are pending.