Retired Brooklyn Supreme Court Judge Frank Barbaro wants a white man he convicted in 1999 of killing a black man to be freed — claiming Wednesday he based the verdict on his own reverse racism. The 86-year-old former jurist convicted Donald Kagan, now 39, of fatally shooting Wavell Wint, 22, during a struggle over Kagan’s chain outside an East New York movie theater in 1998.

But Barbaro told a court that, because of his viewpoint as a civil-rights activist, he didn’t consider a justification defense by Kagan in the nonjury trial.

“Mr. Kagan had no intent to kill that man . . . I believe now that I was seeing this young white fellow as a bigot, as someone who assassinated an African-American,” Barbaro, a former longshoreman who also served 23 years in the state Assembly, told Brooklyn Supreme Court Justice ShawnDya Simpson.

Barbaro said he contacted Kagan’s attorneys after some deep soul-searching led him to realize he had denied Kagan a fair trial.

“I never took it out of my mind. I started reading in the papers that lots of defendants were sent to death or life in prison but were subsequently exonerated. Reading those stories began to affect me,” Barbaro said.

“I was prejudiced during the trial. I realized I made a terrible mistake and there was a man in jail because of my mistake.”

Barbaro contacted defense attorney Jeff Adler, who filed a motion in 2011 to overturn Kagan’s conviction.

Brooklyn DA Homicide Bureau chief Kenneth Taub did not contest putting the case back on the calendar.

Simpson will decide how to proceed — with an outright acquittal looming as one possibility.

Other options are a retrial or a plea deal for time served – or the judge could reject Adler’s motion and leave Kagan in prison.

Barbaro said his work during the civil-rights movement fed into his bias in the trial.

“The question of discrimination against African-American people became part of my fiber — my very fiber,” he told Simpson.

Wint’s family was disgusted as they listened to Barbaro’s backtracking.

“I shouldn’t be back here reliving the past. I thought everything was over with,” said Wavell Wint Jr., who was 4 when Kagan killed his dad.

“He should be ashamed of himself as a judge,” said Wint Jr.’s mom, Carmen De Jesus.