OPINION OF THE COURT
Sullivan, J. P.The People appeal from Trial Term’s grant of a motion to set aside a guilty verdict, and the consequent dismissal of the indictment. The facts are uncontroverted.
On March 18, 1983, at about noon, Oswaldo Bueno, a tenant at 445 East 77th Street, whose apartment faced the rear of the building and looked out onto the roof of a garage which was used as a terrace, glanced out his apartment window and saw, wearing what appeared to be a dark leather jacket, a tall, thin, bespectacled black man, whom he had never seen before, walk past on the roof-terrace. After speaking to a neighbor, Bueno called the police. When he again looked out the window, Bueno could no longer see the man.
Sergeant Laffee and Officers Clarke and Trani arrived about 10 minutes later in response to Bueno’s call. Laffee and Clarke climbed up a flight of outdoor stairs to the garage’s roof-terrace, which was surrounded by a chain-linked fence topped by barbed wire, while Trani remained in front of the building and watched the main entrance. Officer Clarke climbed the fence and spoke to Bueno, while Sergeant Laffee joined Trani in front of the building.
Laffee and Trani decided to await further developments in the lobby. Upon entering, they saw defendant, a black man, tall and thin and wearing glasses and a dark colored brown and black ski parka, walking from the direction of a staircase which led to the first-floor apartments overlooking the roof-terrace. In the 5 to 10 minutes that he had been stationed outside the main entrance, which consisted of two sets of doors, one of which, the inner, was locked, Trani had not seen defendant enter. There was no doorman at the main entrance. Admittance was by either key or buzzer.
Identifying themselves, Laffee and Trani stopped defendant and asked him what he was doing in the building. When defendant responded that he "was taking a leak” he was placed against the wall, frisked and found to be in possession *294of a knife. In response to a radio message from Laffee, Officer Clarke, who was still on the roof-terrace, made his way to the lobby by passing through one of the apartments that abutted the roof-terrace. Except for climbing back over the chain-link fence that enclosed the terrace, these apartments afforded the only route to the lobby. Within minutes after Clarke joined Laffee and Trani, Bueno and the building superintendent arrived. There, in the lobby, Bueno identified defendant as the prowler he had observed on the roof 15 to 20 minutes earlier.
After their meeting in the lobby Clarke, Laffee, and the superintendent went upstairs to the floor above and began checking doors. There, only a few feet from the stairs that led to the lobby where Laffee and Trani had originally seen defendant, they found, unlocked, the door to the studio apartment of Brooke Sandel, and entered. The apartment was in disarray. A television, telephone answering machine, suitcase, and jewelry box were piled on the bed. A window overlooking the roof-terrace was open. When Sandel, who had never seen defendant before, nor given anyone permission to enter his apartment, nor given the keys to anyone, left at 7:00 a.m. that morning, the apartment had not been in such a condition. The apartment was subsequently checked for fingerprints, but none were found belonging to defendant. Defendant, who, according to the superintendent, did not reside in the building, was arrested when Clarke and Laffee returned to the lobby.
At trial, after testifying to his identification of defendant, Bueno later became unsure whether he was in fact the prowler he had seen, and was recalled. Bueno then testified that he identified defendant because, like the prowler, the man in the lobby was tall, thin, black, and wore glasses and a dark jacket. He stated that he was unsure of the identification and did not think that defendant was the same man as the prowler he had seen. As a result of this testimony Trial Term reversed its earlier decision at the Wade hearing and, instructing the jury accordingly, struck from the record all of Bueno’s testimony concerning the identification in the lobby.
After the People rested, defendant moved to dismiss the indictment on the ground that the People had failed to adduce evidence sufficient to warrant submission of the case to the jury. The court reserved decision. Defendant then rested without calling any witnesses. The jury found defendant guilty of burglary in the second degree. Trial Term granted defendant’s motion to set aside the verdict, citing the suppression of Bueno’s lobby identification of defendant as the roof prowler *295and the lack of an in-court identification; Bueno’s inability, upon being recalled, to state positively that the man he saw in the lobby was the roof prowler; the possibility that the burglary could have occurred anytime between 7:00 a.m., when Sandel left for work, and noon, when the police arrived; and, particularly, the lack of any evidence directly connecting defendant with the entry into Sandel’s apartment. Trial Term concluded that defendant’s presence in the building illegally constituted the only evidence of his guilt and that such evidence could not exclude every reasonable hypothesis of innocence. Since we find the evidence sufficient to establish defendant’s guilt, we reverse and reinstate the verdict.
From the uncontradicted evidence, it is clear that the Sandel apartment was burglarized on March 18, 1983. The evidence discloses that after Sandel left for work that morning, someone forced open a window, ransacked the apartment, piling numerous articles of personalty on a bed, and then departed, leaving the front door unlocked. Thus, the only issue on appeal is whether the circumstantial evidence adduced at trial was sufficient to prove beyond a reasonable doubt that it was defendant who, in fact, committed the burglary. In finding him guilty the jury obviously found that the evidence was sufficient.
In assessing the sufficiency of the evidence supporting a guilty verdict, the People are entitled to have the facts viewed in the light most favorable to them. The critical inquiry is whether, viewing the evidence in such light, any rational trier of the facts could have found, the essential elements of the crime to have been proven beyond a reasonable doubt. (Jackson v Virginia> 443 US 307, 319.) Although no different in a case wholly circumstantial, the standard of sufficiency must necessarily be applied in a manner that takes into account the circumstantial nature of the evidence. "The well-settled standard of proof in circumstantial evidence cases is that the facts from which the inference of defendant’s guilt is drawn must be inconsistent with the defendant’s innocence and must exclude to a moral certainty every other reasonable hypothesis.” (People v Giuliano, 65 NY2d 766, 767-768.) As in any criminal case, the People’s evidence must be given "the benefit of every reasonable inference to be drawn therefrom”. (People v Way, 59 NY2d 361, 365.)
Measured by such a yardstick this record discloses that the proof excluded to a moral certainty every reasonable hypothesis except that of defendant’s guilt. (People v Way, supra; *296People v Benzinger, 36 NY2d 29, 32; People v Cleague, 22 NY2d 363, 366.)* Taken as a whole, all the pieces of evidence point inexorably to defendant’s guilt, and to that of no one else. Indeed, the only reasonable explanation for defendant’s presence in the lobby is that, having just burglarized Sandel’s apartment and been alerted to Officer Clarke’s presence on the roof-terrace, he was trying to flee from the building by the only route available.
The roof-terrace abutting the Bueno and Sandel apartments was completely enclosed by the walls of the building and, as already noted, a chain-link fence topped by barbed wire. Thus, it was inaccessible to the public and the man seen by Bueno walking on it, whoever he was, was clearly not authorized to be there. Indeed, Bueno felt sufficiently alarmed to call the police. Later, after the police arrived, they discovered that the Sandel apartment, which opened onto the roof-terrace and had been secure when Sandel left for work only a few hours earlier, had been burglarized. The only logical inference to be drawn from this evidence is that the prowler Bueno saw was the person who burglarized Sandel’s apartment.
Finally, the evidence clearly indicates that defendant was, in fact, that prowler. Approximately 15 minutes after Bueno saw the prowler, defendant was stopped in the building’s lobby by the police. While, as Trial Term noted, Bueno could not positively identify defendant, his description of the prowler matched defendant perfectly. Both were tall, thin, and bespectacled black men wearing a dark brown or black jacket. Also, defendant was found in possession of a knife of a type that easily could be used to pry open window latches. These facts alone established defendant’s identity as the burglar.
In addition, to justify his presence in the building, defendant gave an explanation which was incredible on its face. Obviously designed to hide his criminal foray, his flip excuse that he was there to relieve himself evinces a consciousness of guilt. Furthermore, there is no innocent explanation as to how defendant gained entry into the locked building. Only tenants had keys. Defendant was not a tenant. Nor was he there visiting anyone. Officer Trani, who had been stationed outside *297the building for 5 to 10 minutes, had not seen defendant enter through the front door. These factors alone distinguish this case from the situation in cases such as People v Way (59 NY2d 361, supra) and People v Cleague (22 NY2d 363, supra), where an innocent explanation supportive of a reasonable doubt existed for the defendant’s presence near the scene of the crime.
Other snippets of evidence, placed in context, further support the conclusion that defendant was the prowler who burglarized the Sandel apartment. The only route from the roof-terrace to the lobby is through one of the apartments abutting it. As already noted, Sandel’s was one of those apartments, and its front door is only a few feet from the stairway that leads directly into the lobby. Also, Sergeant Laffee and Officer Trani saw defendant walking into the lobby from the direction of that stairway and the superintendent, although unsure if the two men were the same, had seen a black man walking down the stairs and into the lobby, and then saw defendant arrested seconds later. In addition, the condition of Sandel’s apartment would indicate that the burglar left in a hurry. All of the articles of property that would otherwise have been removed were found on the bed, and the front door to the apartment had been left unlocked. The only fair inference is that, while ransacking the apartment, defendant observed Officer Clarke on the roof-terrace and ran down the nearest flight of stairs into the lobby, where he was stopped by Sergeant Laffee and Officer Trani.
Thus, viewed in its entirety, the evidence established that a prowler, whose description fit defendant in every respect, was seen on the roof-terrace; that while Bueno, who had seen the prowler, was calling the police to report the incident, the prowler gained entry to Sandel’s apartment through a window and began ransacking the apartment and piling articles of personal property on the bed. When the prowler saw Officer Clarke, who had arrived at the scene within minutes, on the roof-terrace, he left the items he intended to steal on the bed, fled through the front door of the apartment and to the nearest stairway, which leads to the lobby. At about the same time defendant, who could not have entered the building within the previous 5 to 10 minutes, walked into the lobby from that same stairway, only to be stopped by Sergeant Laffee and Officer Trani. Without any legitimate reason to justify his presence he could only, absurdly, say that he was there to "take a leak”.
*298Viewing the evidence in the light most favorable to the People, and according it the benefit of every reasonable inference to be drawn therefrom, we find that the proof was sufficient to establish defendant’s guilt beyond a reasonable doubt. The facts from which the jury necessarily drew the inference of defendant’s guilt are inconsistent with innocence and exclude to a moral certainty every other reasonable hypothesis. (See, People v Sanchez, 61 NY2d 1022, 1024; People v Way, 59 NY2d 361, supra; People v Bearden, 290 NY 478, 480.)
Accordingly, the order of the Supreme Court, New York County (Alfred H. Kleiman, J.), rendered November 25, 1983, which granted defendant’s motion to set aside a verdict convicting him of burglary in the second degree and dismissed the indictment, should be reversed, on the law, the motion denied, the indictment and verdict reinstated and the matter remanded for further proceedings.
Asch, Fein, Kassal and Ellerin, JJ., concur.
Order, Supreme Court, New York County, entered on November 25, 1983, unanimously reversed, on the law, the motion denied, the indictment and verdict reinstated and the matter remanded for further proceedings.
The moral certainty standard does not impose any greater burden upon the People than the traditional beyond a reasonable doubt standard of proof. Its function is merely to draw the jury’s attention to the rigorous analytical process which must be undertaken in resolving a case based completely on circumstantial evidence. (People v Barnes, 50 NY2d 375, 380.)