
    The People of the State of New York, Respondent, v Melvin J. Douglas, Appellant.
    [806 NYS2d 764]
   Mercure, J.

Appeal from a judgment of the County Court of Chemung County (Buckley, J.), rendered February 23, 2004, convicting defendant of the crime of burglary in the third degree.

Defendant was charged in an indictment with, among other things, burglary in the second degree, criminal contempt in the first degree and attempted assault in the third degree, arising out of an incident in which he allegedly entered his former girlfriend’s apartment in violation of an order of protection and struck her in the face. He subsequently waived his right to a jury trial. After defense counsel conferred with defendant, counsel agreed to the People’s offer of a “stipulated fact [nonjury] trial, which would result in a conviction for the lesser included offense of third degree burglary, not guilty on the counts of the indictment[, with an] agreed-upon sentence [of] two to four” years in prison. The stipulation provided “[t]hat it is agreed between the People and the defendant that on the 28th day of March, 2003, the defendant knowingly entered or remained unlawfully in a building, located at 370 West Water Street, to commit a crime therein.” Beyond that, the record reflects no discussion of the underlying facts with defendant, admission of guilt on his part or indication that he understood the nature of the charge contained in the stipulated facts. Moreover, no witnesses were sworn or testimony taken. County Court nevertheless determined that defendant was guilty of burglary in the third degree as a lesser included offense and not guilty of the charges in the indictment. Following a sentencing hearing at which it was noted that defendant made a statement claiming that he was a guest in his girlfriend’s apartment and denied hitting her, County Court sentenced him, as a second felony offender, to a prison term of 2 to 4 years in accordance with the parties’ “plea bargain.” Defendant now appeals, challenging the sufficiency of the stipulation of facts that provided the basis for the conviction.

Penal Law § 140.20 states that “[a] person is guilty of burglary in the third degree when he knowingly enters or remains unlawfully in a building with intent to commit a crime therein” (emphasis added). Thus, to be guilty of burglary, a defendant must both enter or remain unlawfully and have the intent to commit a crime other than criminal trespass at the time that the defendant enters the building or remains after authorization to be on the premises terminates (see People v Gaines, 74 NY2d 358, 363 [1989]; see also People v Lewis, 5 NY3d 546, 551-553 [2005]). Here, as defendant asserts, the element of intent is absent from the stipulation of facts. Nor does the stipulation contain enough information to permit an inference'of intent here, and no additional evidence regarding the underlying facts was adduced before County Court (cf. People v Mercado, 294 AD2d 805, 805 [2002], lv denied 98 NY2d 731 [2002]). Hence, there was not legally sufficient evidence to support defendant’s conviction of burglary in the third degree.

More fundamentally, the stipulation cannot be deemed an adequate plea of guilty inasmuch as it provided no assurance of defendant’s guilt or that his admissions were intelligently made (see People v Lopez, 71 NY2d 662, 666 [1988]). In addition, because no witness was ever sworn during the “nonjury trial,” defendant was not “ ‘prosecuted’ for an offense” and, thus, jeopardy did not attach (CPL 40.30 [1]; see People v Gingello, 84 Misc 2d 63, 65 [1975]). Accordingly, we must remit this matter to County Court for trial or other appropriate disposition. In view of our decision, we need not address defendant’s remaining claim.

Cardona, P.J., Mugglin, Rose and Lahtinen, JJ., concur. Ordered that the judgment is reversed, on the law, and matter remitted to the County Court of Chemung County for further proceedings not inconsistent with this Court’s decision. 
      
       To the extent that it may be argued that defendant did not preserve his challenge to the proceedings before County Court, we conclude that “there was a fundamental, nonwaivable defect in the mode of procedure”—that is, “the procedure adopted by the court below is at a basic variance with the mandate of law [such that] . . . the error complained of goes to the essential validity of the proceedings conducted below”—and, thus, preservation was not necessary (People v Patterson, 39 NY2d 288, 295-296 [1976], affd 432 US 197 [1977]; see People v Agramonte, 87 NY2d 765, 769-770 [1996]).
     