Appeal from a judgment of the County Court of Schenectady County (Giardino, J.), rendered January 18, 2001, upon a verdict convicting defendant of the crimes of burglary in the first degree (two counts) and burglary in the second degree.
Defendant’s burglary convictions arose from events that occurred in the apartment of Beverly Johnson, who was a friend of defendant. The victim and his cousin, Shakar Pierre, stopped by Johnson’s apartment on March 18, 2000. Defendant, who was looking to confront Pierre about a small amount of money owed by Pierre, phoned Johnson and learned that Pierre was at her apartment. He proceeded to the apartment and entered without seeking permission through the unlocked front door. Pierre fled, but the victim remained on a couch in the apartment. Defendant was followed into the apartment by an individual accompanying him that day, Michael Alvarez, who was brandishing a shotgun. Alvarez directed the victim to strip and, when he did not immediately comply, Alvarez struck him in the face with the gun, causing a cut and bleeding that resulted in a scar on the victim’s face. The victim testified that he began removing his clothing, that defendant removed his pants and sneakers and left the apartment with those items. Alvarez also exited the apartment and ostensibly fired several shots into the air. Defendant was apprehended later that day and gave a statement to the police.
By a 17-count indictment, defendant was charged with the crimes of robbery in the first degree (three counts), robbery in the second degree (two counts), burglary in the first degree (three counts), burglary in the second degree (three counts), assault in the second degree, criminal use of a firearm in the first degree (two counts), criminal use of a firearm in the second degree (two counts) and menacing in the second degree. During the trial, County Court dismissed, pursuant to CPL 300.40 (6) (b), seven of the counts, i.e., two counts of burglary in the second degree and one count each of robbery in the first degree, burglary in the first degree, criminal use of a firearm in the first degree, criminal use of a firearm in the second degree and menacing in the second degree. The jury ultimately acquitted defendant of the criminal use of a firearm and assault charges, it could not reach a verdict on the robbery charges, and it convicted defendant of two counts of burglary in the first degree *1015and one count of burglary in the second degree. He was sentenced as a second felony offender to concurrent prison terms of 18 years for the first degree burglary convictions and 15 years for the second degree burglary conviction. Defendant appeals.
Defendant argues that the verdict was not supported by legally sufficient evidence and was against the weight of the evidence. Specifically, he contends that the People failed to prove the element of burglary that he entered or remained unlawfully (see Penal Law § 140.00 [5]; §§ 140.25, 140.30; People v Graves, 76 NY2d 16, 20-21 [1990]; People v Hargett, 11 AD3d 812, 814 [2004], lv denied 4 NY3d 744 [2004]). Johnson testified that defendant was “like family,” he was frequently at her apartment and she had no problem with him entering without knocking. However, a neighbor testified that, shortly after defendant and Alvarez entered the apartment, she heard Johnson yelling, “please leave, please go, get out of my house.” The victim testified that Johnson told defendant and Alvarez to stop. Defendant’s statement to police acknowledged that Johnson said, “Please not here, my kids.” While the People failed to prove that defendant’s entry into the apartment was unlawful (see People v Tennant, 285 AD2d 817, 818 [2001]), there was adequate evidence that defendant was directed by Johnson to cease his activity and to leave the apartment, but that he failed to do so. This evidence, viewed most favorably to the People, established that defendant remained unlawfully (see People v Licata, 28 NY2d 113, 117 [1971]; see also People v Deis, 97 NY2d 717, 719 [2002]; People v Gaines, 74 NY2d 358, 363 [1989]). Further, after independently reviewing and weighing the evidence, we are not persuaded that the verdict was against the weight of the evidence (see People v Thornton, 4 AD3d 561, 563 [2004], lv denied 2 NY3d 808 [2004]).
We are persuaded, however, that evidentiary errors requiring reversal occurred. The prosecutor mentioned that defendant had been in jail pending the trial in several questions posed to the neighbor who heard the incident. Defense counsel’s objection was overruled and his motion for a mistrial denied. The repeated reference to defendant’s incarceration was improper under these circumstances (see People v Jenkins, 88 NY2d 948, 951 [1996]; People v Machicote, 251 AD2d 684, 684 [1998]). In addition, the People, in their case-in-chief, elicited over defense counsel’s objection testimony from Johnson that she had received threatening phone calls regarding her testimony. There was no evidence attributing these threats to defendant and no curative instruction was given regarding this testimony. While *1016“[i]t is appropriate to elicit testimony concerning nonattributable threats made to a witness where the purpose is to explain inconsistent statements brought out by defense counsel, provided that the jury is duly cautioned” (People v Rivera, 160 AD2d 267, 271 [1990]), such was not the situation in the present case. The cumulative effect of these errors in the context of this case, where there was considerable conflicting evidence offered and credibility determinations were crucial (including the credibility of defendant, who elected to testify), cannot be characterized—as urged by the People—as harmless.
The remaining arguments are academic.
Cardona, P.J., Peters, Carpinello and Mugglin, JJ., concur. Ordered that the judgment is reversed, on the law, and matter remitted to the County Court of Schenectady County for a new trial.