Wild video obtained exclusively by The Post shows a group of good Samaritans banding together to bring a crazed subway maniac to justice — after he allegedly stole a cellphone, then shoved a New York Times illustrator onto some Manhattan subway tracks during the Thursday morning rush.

The clip shows a half-dozen brave straphangers calling for police and encircling the accused in order to block his escape, moments after the 10 a.m. incident on the F train platform at the Broadway-Lafayette station.

The attacker, identified by police as homeless man Nathaniel Brown, 41, can be seen pacing with agitation as he tries to evade the good guys.

At one point, Brown rips off his shirt to wipe the sweat from his brow before trading blows with a passerby who tries to block his escape, footage shows.

He can also be seen bull-rushing though a phalanx of Samaritans, but as he’s charging upstairs, another quick-thinking commuter comes down the steps and heroically body-checks Brown backwards onto the ground, the clip shows.

Undeterred, he tries to get back up, but another straphanger hooks his ankle and sends him back to the ground.

“Call the cops!” someone yells as the video ends.

Police showed up at 10:15 a.m. and collared the man, who also injured an arresting officer’s wrist, according to cops.

Police sources say Brown first robbed someone of a cellphone on a No. 6 train at Spring and Canal streets minutes before.

A phone was recovered on him, and police used the device to track down its rightful owner, sources said.

Then he got into an argument with a 30-year-old stranger at Broadway-Lafayette at 10 a.m. and shoved him onto the tracks, fracturing the man’s hip and leaving him with cuts, cops said.

The fiend then spat on a 25-year-old who tried to help the first victim, according to police.

The 30-year-old victim was taken to Bellevue hospital, while the 25-year-old refused medical attention, cops said.

The Post confirmed the older victim is an illustrator for the New York Times, but is withholding his identity, because he was not available for a comment.

He was wearing a full neck brace when The Post visited him in the hospital Thursday afternoon.

Brown, meanwhile, was arrested on charges of assault and resisting arrest, police said.

He was also shouting “Allahu akbar” — a common Muslim prayer that has also been co-opted by religious extremists — when he was arrested, sources said.

Cops are investigating any possible terror ties, according to sources.

The injured officer, meanwhile, was taken to Bellevue and treated for minor injuries. According to photos taken at the scene, the hurt cop is NYPD Officer Chester Chung, who helped reunite a lost 4-year-old with his mother last October.

Local trains through the station were rerouted until about 10:20 a.m., the MTA said.

Additional reporting by David Meyer and Elizabeth Rosner