Judgment of the Supreme Court, New York County (Ronald S. Hayes, J.), entered October 19, 1989, convicting defendant, after trial by jury, of burglary in the first degree and sentencing him to a term of from two to six years, is unanimously reversed, on the law, a conviction for criminal trespass in the second degree substituted therefor and the matter remanded to the Supreme Court for resentencing in accordance therewith.
Defendant, who was under psychiatric care, went to visit his uncle in the subject premises, a rooming house, in order to borrow some money. The People offered no proof as to the time or circumstances of defendant’s entry, but he testified that he walked past the unattended security desk. When he did not find his uncle at home, he took an elevator to the roof and crossed over into the other half of the building. He later went into common bathrooms located on two and possibly three floors and cut hoses under the sinks with a boxcutter, causing water leakage. There was testimony that he brandished the boxcutter when he attempted to flee and was struck in the head with a baseball bat by a security guard. While the manager of the building testified that defendant did not have permission to be on the premises, and had specifically been told to stay away, defendant testified he entered the premises to visit his uncle, believing that he was entitled to do so.
*384We find upon a review of the record that the People did not sustain their burden of proof of burglary in the first degree since they did not establish beyond a reasonable doubt that the defendant had the requisite intent to commit a crime on the premises contemporaneous with either an unlawful entry or an unlawful remaining (see, People v Gaines, 74 NY2d 358). While defendant obviously had the unlawful intent to commit a crime when he cut the hoses, the unlawful intent necessary to support a conviction for burglary in the first degree could not be formed after an unlawful entry or after an unlawful remaining (supra). Even accepting the evidence that defendant committed a trespass when he entered the building, because of the manner of his entry, the previous warnings to stay away or the posted visiting hours which he violated, it was undisputed that defendant had an uncle in the building and several acquaintances who he often visited.
We find that, under these circumstances, the People failed to prove beyond a reasonable doubt that defendant entered or remained with the intent to commit a crime contemporaneous with the entering or remaining. It is just as reasonable to infer from the circumstances, including the somewhat bizarre nature of the crime, that the intent arose, as defendant testified, spontaneously, when he engaged in the criminal conduct (see, People v Konikov, 160 AD2d 146, lv denied 76 NY2d 941).
This conclusion is strengthened by the fact that the trial court failed to instruct the jury that the requisite intent must accompany the commencement of the unlawful entry or remaining.
After deliberations had commenced, the jury asked for and was reinstructed on the "components” of burglary in the first degree. Subsequently, the jury asked for a definition of intent and asked, "Can intent occur once the defendant is inside the building?” The court, once more, gave the jury a charge that defendant could form the necessary intent "while * * * unlawfully entering or unlawfully remaining”. A little over twenty minutes later, the jury returned a verdict of guilty on the first degree burglary. Thus, it is apparent that the critical question for the jury was at what point was it necessary for the defendant to form the intent to commit a crime to constitute the requisite intent under the first degree burglary. If they had been correctly instructed (see, People v Gaines, supra), the circumstances of their raising the issue as to when the defendant must have formed the intent, and their speedy decision lead to the reasonable inference that they would have *385acquitted defendant of the first degree burglary charge. The court, at sentencing, implicitly agreed with this analysis when it stated that the "real essence” of the defendant’s crime was criminal mischief.
Since we find that defendant was not guilty of burglary, but only of criminal trespass in the second degree ("A person is guilty of criminal trespass in the second degree when he knowingly enters or remains unlawfully in a dwelling” [Penal Law § 140.15]), we remand to the Supreme Court for resentencing. Concur — Murphy, P. J., Milonas, Ellerin, Asch and Rubin, JJ.