In the city, in the darkness, a teenager held a knife.

“Watch out!” one of the Chicago police officers yelled.

The kid was known around the neighborhood — someone to keep an eye on.

The young man lunged, police said. One cop, fearing for his life, opened fire. The teen dropped to the ground, dead.

Matthew Walsh has been thinking a lot recently about that version of the events that occurred 50 years ago in a Wrigleyville alley.

That’s because it’s a story strikingly similar to one that will be told this week in a Cook County courtroom —  as the trial gets underway in earnest with opening statements in the first-degree murder trial of Chicago Police Officer Jason Van Dyke.

Walsh, 76, was the last prosecutor in the county to try a Chicago cop for an on-duty murder. It took two trials, but officer Richard Nuccio, then 28, was eventually sentenced to 14 years in prison, after jurors rejected his self-defense argument in the slaying of 19-year-old Ronald Nelson.

“Nuccio was hot-tempered, and we just assumed he was pissed because the kid ran away from him and wouldn’t do what he was told,” Walsh said, talking about a motive that prosecutors never quite nailed down at the time.

Matthew Walsh

Matthew Walsh is the last prosecutor in Cook County to try a Chicago cop for an on-duty murder. He recalls the case at his Palos Heights law office. I Eliza Davidson/Sun-Times

And as in the Van Dyke case, Nuccio’s fellow officers — three of them — all backed his version of the events on that June 4, 1968, night.

But Walsh, who still practices law, is also struck by the jarring differences between then and now.

“Remember, you’re talking about 1968 and ’70. A lot of strange things were happening back then,” Walsh said.

Nelson was killed a day after a radical feminist tried and failed to kill artist Andy Warhol and a day before Sirhan B. Sirhan shot Sen. Robert F. Kennedy.

Within a couple of months, downtown streets would be filled with thousands of anti-war protesters, clashing with cops wielding billy clubs and gas canisters.

Nelson was a tall, lanky kid — a “greaser” who styled his dark hair with pomade and wore a black leather jacket. He smoked marijuana, did a few “pills,” but he wasn’t a troublemaker, said his girlfriend at the time, Sylvia San Pietro.

“He dressed the wrong way, and I guess everyone knew he smoked grass,” said San Pietro, now 66 and a grandmother.

Nelson rubbed Nuccio the wrong way. The policeman would often stop the teenager for no particular reason — once making him get into his patrol car, taking his shoes and making the teen walk home barefoot, San Pietro said.

On the night of the shooting, Nelson was hanging out with other teenagers between the Tastee Freez ice cream stand and Franksville, a hot dog joint. The hot dog seller had called the cops, claiming he’d seen Nelson with a knife — although other witnesses said they never saw the teen holding anything.

Nuccio, who’d joined the police force two years earlier, chased Nelson, firing after the teen raised his hand to throw a knife at him, the officer would later say. Race wasn’t a factor. Both Nuccio and Nelson were white.

San Pietro arrived soon after the shooting.

“He was a good kid,” she said, tears halting her words. “His life was taken away from him for no reason. It was a vendetta.”

Walsh said he took a big risk prosecuting Nuccio.

“If you prosecuted policemen back in those days, the whole police department shut you down,” Walsh said.

But Walsh had this in his favor: He’d previously prosecuted several cop killers.

A judge initially found Nuccio guilty of murder on Aug. 30, 1968, a conviction that was overturned on appeal. But it’s a later jury trial that stands out in Walsh’s mind.

The judge in the case, Felix M. Buoscio, had a year before trial been named the Chicago Police Department’s Italian-American of the year, Walsh said. The man who handed him the award? Officer Nuccio, also Italian-American. Despite this, Buoscio insisted to prosecutors that he could be fair and impartial.

Walsh and his team battled famed criminal defense attorney Julius L. Echeles, whose clients included mobsters and who sauntered into court each day wearing eye-catching argyle socks, a sport coat and no tie.

“Echeles had a couple of girls he brought in from Vegas to sit and watch the trial,” Walsh recalled. “They sat in the front row . . . They were 6 feet tall or better, with very long legs. So we all assumed they were showgirls.”

It was a case that Echeles never expected to lose, mostly because police were held in high regard in the city and the nation, Walsh said.

What sealed Nuccio’s fate, Walsh said, was something that no judge would permit today, and certainly not the famously stern judge in the Van Dyke case, Vincent Gaughan.

At one point, Nuccio was on the witness stand, explaining to prosecutors how, as he chased Nelson in that dark alley, the teenager turned and hurled the knife at him.

Walsh asked Nuccio to step down from the stand. The prosecutor handed the accused murderer a knife. Walsh asked him to demonstrate to jurors how Nelson ran, turned and threw his weapon.

“Nuccio tried to duplicate it,” Walsh recalled. “He couldn’t do it. Whenever he threw the knife, it went up to the ceiling or it went off to the side . . . That was persuasive to the jury.”

It took the jury just a few hours to find Nuccio guilty as charged, Walsh said.

When Judge Buoscio handed down a 14-year prison term, Nuccio had only this to say: “I’m innocent.”

Nuccio would eventually get a break, but not from a judge. Then-Gov. Dan Walker later reduced Nuccio’s punishment, allowing him serve only six years of his sentence.