Judgment unanimously reversed on the law, motion granted and indictment dismissed. Memorandum: Defendant was convicted of criminal sale of a controlled substance in the third degree and criminal possession of a controlled substance in the third degree following a bench trial. The charges arose on January 21, 1989, when, at about 2:00 a.m., two undercover police officers went to the home of one Stanley Robinson to confront him because one month earlier he had sold them powdered sugar instead of cocaine. The officers, who had been drinking beer in a local bar for hours, knocked on the door of Robinson’s home and demanded entry. Once inside, they accused Robinson and defendant, who was also present, of having "ripped them off”. The officers demanded money or drugs. The officers admitted that one of them displayed a loaded gun during the early stages of the encounter. Eventually, defendant offered the officers $50 and a gram of cocaine to make things even. Defendant pulled money and a small package of cocaine from his pocket and handed them to the officers. Defendant was charged with third degree criminal sale and possession of a controlled substance as a result of that incident.
County Court denied defendant’s motion to dismiss the indictment on the ground that his right to due process had been violated by police misconduct. We reverse and grant the motion.
In People v Isaacson (44 NY2d 511, 518-519, rearg denied 45 NY2d 776), the Court of Appeals held that, in some instances, police conduct, "when tested by due process standards”, can be "so egregious and deprivative as to impose upon us an obligation to dismiss” (see also, People v Brown, 136 AD2d 1, 10, lv denied 72 NY2d 857, cert denied 488 US 897). Even if defendant fails to prove entrapment because he was predisposed to commit the crime, dismissal may be warranted "[t]o prevent improper and unwarranted police solicitation of crime” (People v Isaacson, supra, at 520-521). The Court set forth four factors to be considered when evaluating a due process claim: (1) whether the police manufactured a crime which otherwise would not likely have occurred, or merely involved themselves in ongoing criminal activity; (2) whether the police themselves engaged in criminal or improper conduct repugnant to a sense of justice; (3) whether defendant’s reluctance to commit the crime is overcome by appeals to humanitarian instincts, such as sympathy or past friendship, by temptation of exorbitant gain, or by persistent solicitation in the face of unwillingness; *951and (4) whether the record reveals simply a desire to obtain a conviction rather than to prevent further crime or protect the populace (People v Isaacson, supra, at 521).
We conclude that this is one of those rare cases where the conduct of the police, measured against the factors set forth in People v Isaacson (supra) deprived defendant of due process. There can be no dispute that the officers manufactured this crime by going to Robinson’s home in the middle of the night demanding drugs. Defendant did not seek out the officers to sell drugs to them and the meager evidence that defendant may have been involved in the prior sale to the officers of powdered sugar rather than cocaine hardly supports a finding of "ongoing criminal activity”. More importantly, the officers engaged in "criminal or improper conduct repugnant to a sense of justice” (People v Isaacson, supra, at 521). The actions of the officers, demanding entry to a person’s home in the middle of the night, displaying a gun and demanding drugs, are not justified by the fact that the officers were working undercover. By engaging in such violent and intimidating conduct, the officers crossed the threshold into "sheer lawlessness” and demonstrated their desire to obtain a conviction above all else. Defendant’s handing over cocaine was obviously coerced by egregious police misconduct. To allow this prosecution to stand would mock " 'that fundamental fairness essential to the very concept of justice’ ” (People v Isaacson, supra, at 522).
Additionally, the suppression court erred by failing to suppress the cocaine the officers obtained from defendant. It was established at the hearing that defendant did not hand over cocaine until one of the officers displayed a weapon, accused defendant of "ripping him off”, and demanded money or drugs. The court’s conclusion that defendant’s delivery of the cocaine was the willing act of someone voluntarily negotiating with the officers to settle a debt is not supported by the record as a matter of law (see, People v Leonti, 18 NY2d 384, 390, cert denied 389 US 1007).
In light of our determination, it is unnecessary to reach the remaining issues raised by defendant. (Appeal from Judgment of Allegany County Court, Feeman, Jr., J. — Criminal Sale Controlled Substance, 3rd Degree.) Present — Callahan, J. P., Boomer, Pine, Boehm and Doerr, JJ.