A trial judge violated a defendant’s right of confrontation by curtailing cross-examination of his alleged accomplice, who had testified for the prosecution, a unanimous Manhattan appellate panel has ruled.

Neal McLeod was convicted of several crimes related to a June 2009 robbery of an off-duty police officer. At his January 2012 trial, McLeod testified he had been driving around Manhattan with four friends to meet girls and did not know his friends were planning a robbery.