A troubled teenage father struggling to turn his back on the Bloods street gang was gunned down as he walked away from an argument on a Harlem street yesterday — a horrific execution-style killing caught in chilling detail on video obtained exclusively by The Post.

Police said 17-year-old Cory Squire, the father of a 3-year-old boy, died instantly after being shot once in the head from behind on West 141st Street around 4:30 a.m.

The video, recorded by a surveillance camera in the building at 101 W. 141st Street, shows Squire walking along, wearing a hooded sweatshirt when another man calls out to him.

The two talk for about a minute, then separate.

But as Squire continues on his way the other man silently runs up behind him, methodically clutching a gun in his right hand, and puts a bullet in the teen’s head.

The young father falls to the ground and rolls over motionless as the cowardly attacker flees.

A short time later, another unidentified man walks past the body, looks down, then callously continues on his way.

Squire’s shocked girlfriend, Atiya Hallman, 18, said the slain teen had fought to escape the street gang after becoming a dad.

"Once he had a child, he wanted to get out of the game and quit the gang," Hallman said, as she cradled the couple’s son, Camren.

"He joined the Job Corps and was training to be an electrician, but he always knew the only way he could get out of that gang was the way he got out."

An official motive remained unclear, but police could not rule out retribution for trying to sever his gang ties.

Squire’s mother, Melinda Chirinos, said he had been honored by Police Commissioner Ray Kelly in 2005 when he was named Commanding Officer for the Day for the 32nd Precinct, but fell in with the Bloods recently and began stealing from her.

"I basically told him he could live here if he chose not to see those friends and follow the rules of the house," she said. "He chose his friends over his family."

The hard-luck teen crashed with his girlfriend during the day but wandered the streets after dark because her strict mother didn’t allow overnight visits.

"I saw his death coming," said his sister, Allayah, 14. "He kept telling me, ‘I got to get off the streets.’ He didn’t think he’d make it to 18. He was right."

The video does not provide a clear picture of the killer, but police were hoping that friends and associates of Squire might recognize the shooter.

One eyewitness, a 66-year-old woman whom The Post is not identifying, said she saw the victim and killer argue.

"The teenager walked away, and the guy pulled out a gun, ran up to him and shot him in the back of the head," she said. "I ran into my apartment and called 911. It was terrible seeing a young man get killed like that."

Additional reporting by Jamie Schram and Larry Celona