ALBANY – A defendant’s right to counsel was violated when he was interrogated in a Pennsylvania jail by a New York police detective who did not inquire first whether the man had an attorney, the state Court of Appeals decided yesterday.

Ollman Lopez waived his right to have counsel present during the interview in which he made statements implicating himself in a 2002 Staten Island robbery that resulted in the death of a store clerk.