Judgment unanimously reversed on the law, defendant’s motion to suppress granted and defendant remanded to Niagara County Court for further proceedings on the indictment, in accordance with the following memorandum: The court erred in denying defendant’s motion to suppress a written statement he gave to the police on July 30, 1986. At the time the statement was given, the police knew that defendant had unrelated charges pending because defendant was apprehended based on a bench warrant issued July 11, 1986 when defendant failed to appear in connection with such charges. Under these circumstances the police had an obligation to inquire whether defendant was represented by counsel on the pending charges and, having failed to do so, were chargeable with what such an inquiry would have disclosed (People v Bartolomeo, 53 NY2d 225, 231-232). An investigation would have shown that defendant was represented by the Public Defender. With such knowledge the police were foreclosed either from questioning defendant or accepting his waiver in the absence of counsel (People v Rogers, 48 NY2d 167). We have considered defendant’s remaining claims and find that each one lacks merit (see, People v King, 140 AD2d 1011, Iv denied 72 NY2d 920). (Appeal from judgment of Niagara County Court, Hannigan, J. — rape, first degree; sodomy, first degree.) Present — Callahan, J. P., Doerr, Green, Pine and Davis, JJ.