OPINION OF THE COURT
Smith, J.A person commits burglary in the third degree when he or she “knowingly enters or remains unlawfully in a building with intent to commit a crime therein” (Penal Law § 140.20). If the building is a “dwelling,” however, the crime is a more serious one, burglary in the second degree (Penal Law § 140.25 [2]). The question in this case is whether a burglary committed in the nonresidential part of a building used partly for residential purposes should be treated as the burglary of a dwelling.
We last confronted this question long ago, in Quinn v People (71 NY 561 [1878]). That case established a rule that we reaffirm today: Generally, if a building contains a dwelling, a burglary committed in any part of that building is the burglary of a dwelling; but an exception exists where the building is large and the crime is committed in a place so remote and inaccessible from the living quarters that the special dangers inherent in the burglary of a dwelling do not exist. Applying that rule to this case, we hold that the evidence supports defendant’s conviction on two counts of second degree burglary.
I
A large building at 234 West 42nd Street in Manhattan is occupied by a number of different businesses, including a Hilton Hotel. The hotel has two lobbies, on the ground floor and the 14th floor. Between the two lobbies is nonhotel space. The 16th floor is the conference room level. We infer from the record that the hotel’s guest rooms are on the 17th floor and above. Two stairways, stairway D and stairway E, are respectively on the west and east of the hotel space. A locker room used by Hilton employees may be reached from the 14th floor lobby by entering *625stairway E (the east stairway) and going up a few steps to a mezzanine. On the other side of the building, to the west of stairway D and rising from the street level but not reaching the level of the hotel’s 14th floor lobby, is Madame Tussaud’s Wax Museum.
The hotel’s video security system shows that on October 6, 2009, at 10:22 in the evening, defendant entered the locker room with a sweater over his head. He broke into a locker, then promptly left the locker room when a Hilton employee entered it. Some four minutes later, another security camera shows defendant walking down stairway D. There was evidence that, to get from the locker room to stairway D, defendant must have gone up stairway E to the 16th floor and crossed from one stairway to the other at the conference room level.
There is no direct evidence showing where defendant was or what he did for roughly the next three hours. Beginning shortly after 1:30 a.m. on October 7, he appears in a number of video images from security cameras in the wax museum. He is seen sliding a box along the floor and putting things into it, and then taking a hand truck.
Shortly after 4:00 a.m. on October 7, defendant came from stairway D onto the sidewalk outside the building, pushing a hand truck with boxes on it. As it happened, a hotel security official and a building security guard were at that moment on the sidewalk, discussing the earlier, locker room burglary. One of them followed defendant until he could get the attention of a police officer, and defendant was arrested with stolen property.
A jury convicted defendant on two counts of burglary in the second degree, the first for the locker room burglary on October 6 and the second for the wax museum burglary on October 7. The Appellate Division affirmed (People v McCray, 102 AD3d 560 [1st Dept 2013]). A Judge of this Court granted leave to appeal (21 NY3d 1006 [2013]), and we now affirm.
II
Defendant does not dispute that the evidence supports his conviction for two burglaries, but says that they were third degree, not second degree, burglaries. The People say that a reading of the burglary statutes is enough to refute defendant’s argument. As we have mentioned, Penal Law § 140.25 (2) elevates third degree burglary to second degree burglary when “[t]he building is a dwelling.” “Dwelling” is defined as “a building *626which is usually occupied by a person lodging therein at night” (Penal Law § 140.00 [3]). The Hilton Hotel is unquestionably a dwelling by this definition. And the definition of “building” includes the following: “Where a building consists of two or more units separately secured or occupied, each unit shall be deemed both a separate building in itself and a part of the main building” (Penal Law § 140.00 [2]). Thus, the People say, a burglary committed anywhere in a building of which a dwelling is a part counts as a dwelling burglary.
We find the case less simple than the People do. To explain why, we will examine the history of the special treatment given by the law to burglaries of dwellings, and particularly our 1878 decision in Quinn.
At common law, burglary could be committed only by breaking into a dwelling, called in earlier days a “mansion-house,” or by “breaking in the gates or walls of a town” (2 Blackstone, Commentaries on the Laws of England at 224-225 [1789 ed]). By the time we decided Quinn, the crime had been expanded by statute and divided into degrees. Breaking into “a dwelling-house” with intent to commit a crime was either first or second degree burglary, depending on the time and manner in which the crime was committed (3 Rev Stat of NY, part IV, ch I, tit III, art 2, §§ 11-13 [6th ed 1875]); while breaking into a “shop, store, booth, tent, warehouse or other building” was, if it met the other criteria for burglary, only burglary in the third degree (id. § 18 [2]). A statute said that “[n]o building shall be deemed a dwelling-house, or any part of a dwelling-house . . . unless the same be joined to, immediately connected with, and part of a dwelling-house” (id. § 17).
Quinn involved a building of which the lower floors were used for a shop. One of the owners of the shop “and some other persons” lived on the upper floors (71 NY at 564). There was no “internal communication” between the shop and the living quarters; to go from one to another, it was necessary to go into the yard, and then up stairs (id. at 565). The defendant broke into a room in the shop.
We affirmed the defendant’s conviction of first degree burglary. We held the shop to be part of the “dwelling-house,” despite the absence of internal communication with the place where people slept, because “it was within the same four outer walls, and under the same roof’ (id. at 565). We pointed out that first degree burglary, as then defined by statute, was not *627materially different from common-law burglary, and then explained why Quinn’s crime fit the definition:
“the essence of the crime of burglary at common law is the midnight terror excited, and the liability created by it of danger to human life, growing out of the attempt to defend property from depredation. It is plain that both of these may arise, when the place entered is in close contiguity with the place of the owner’s repose, though the former has no relation to the latter by reason of domestic use or adaptation” (id. at 567).
These words from almost a century and a half ago are still apt as an explanation of why burglary of a dwelling is a more serious crime than other burglaries: an intrusion into a home, or an overnight lodging, is both more frightening and more likely to end in violence. And it remains true today, as it was in 1878, that these dangers are created in significant degree when the crime is committed “in close contiguity” with a “place of repose” even though the place of the burglary and the sleeping quarters are not instantly accessible to each other. When a store owner in his bedroom becomes conscious that there is a burglary in the shop downstairs, or when a hotel guest hears a burglar in the coffee shop across the hall from her room, the special dangers that accompany the burglary of a dwelling are sufficiently present to justify treating the crime as a more serious one than burglary of a building where no one lives.
But, as we recognized in Quinn, the rule that burglary of a dwelling occurs whenever a burglar enters a place “within the same four outer walls, and under the same roof’ as a room used for sleeping at night cannot be unqualified. It is easy to imagine a crime to which that rule would literally apply that does not create the enhanced danger characteristic of a dwelling burglary. To take an extreme case: imagine a skyscraper used largely for stores and offices, with a few apartments remote and inaccessible from the commercial space. A burglar who breaks into one of the commercial units may create virtually no risk that the people living in the apartments will even be conscious of his presence. Such a burglar should be convicted only of third degree, not second degree, burglary. Thus we said in Quinn-.
“It may ward off misapprehension if it is said, that if different stores in a large building, some parts of which are used for sleeping apartments, are rented *628to different persons for purposes of trade or commerce, or mechanical pursuit, or manufacturing, another rule comes in. For illustration, let there be mentioned the Astor House in New York city. The rule is, that a part of a dwelling-house may be so severed from the rest of it, by being let to a tenant, as to be no longer a place in which burglary in the first degree can be committed; if there be no internal communication, and the tenant does not sleep in it. Then it is not parcel of the dwelling-house of the owner, for he has no occupation or possession of it; nor is it a dwelling-house of the tenant, for he does not lodge there” (71 NY at 573-574 [citations omitted]).
Though the Astor House is no longer the epitome of a large New York City building, and though we no longer stress the formality of a lease by which part of the building is “severed” from the rest, the essence of the “Astor House exception” to Quinn’s rule that burglary of a dwelling is committed whenever a burglary occurs in a building that contains a dwelling remains viable.
The People argue otherwise, insisting that today’s Penal Law sections, particularly the language that says separate units “shall be deemed . . . part of the main building” (Penal Law § 140.00 [2]), effectively codify the principal holding of Quinn but not the Astor House exception. We reject the People’s argument. When we recognized the Astor House exception in 1878 it was, as it is today, a common sense limitation on a literal reading of a statute. By adopting the “four walls and a roof’ rule of Quinn, we held that the section of the then-existing Revised Statutes that said no building could be a “dwelling-house” unless “joined to, immediately connected with, and part of, a dwelling-house” excluded only separate buildings, not separate apartments within a single building (71 NY at 573). Thus, there was in the Revised Statutes when Quinn was decided no explicit language supporting the Astor House exception. We nevertheless endorsed the exception, because we believed that in some cases applying the four walls and a roof rule would stretch the statute beyond its purpose.
We have no reason to view the legislative purpose differently today. We are aware of no evidence that the legislature has ever decided to reject the exception we described in Quinn, or to authorize a conviction for burglary of a dwelling where the burglar neither comes nor readily can come near to anyone’s living quarters. A review of some of the changes in the burglary statutes after 1878 bears this out.
*629In 1881, the legislature adopted a new Penal Code that included language, not in existence when Quinn was decided, saying: “If a building is so constructed as to consist of two or more parts occupied by different tenants separately for any purpose, each part or apartment is considered a separate building” (Penal Code of 1881 § 503). This seems to nullify Quinn’s four walls and a roof rule. Similar language was included in various statutes for many years (see Penal Law of 1909 § 401) during which we have found no case following the Quinn rule. In the 1965 version of the Penal Law, section 140.00 (2) continued the pattern, saying: “Where a building consists of two or more units separately secured or occupied, each unit shall be deemed a separate building.”
The 1967 legislature, however, amended the statute to read as it does today: “each unit shall be deemed both a separate building in itself and part of the main building” (L 1967, ch 791, § 14). The purpose of the 1967 change was explained by a committee that approved it:
“The purpose of this amendment is to denominate as burglary certain conduct which is not presently covered. For example, an intruder enters an apartment A of a multiple-apartment building solely to gain access to apartment B wherein he intends to commit a crime. Under present law, the invasion of apartment A does not constitute burglary in any degree since the element of ‘intent to commit a crime therein’ is missing. The proposed amendments [sic] remedies this situation” (Rep of Assembly Rules Comm, 1967 Legis Ann at 20).
We interpret the remedy adopted by the 1967 Legislature as reviving Quinn’s holding that, in general, burglary of a partly residential building is burglary of a dwelling, even if the burglar enters only the nonresidential part. But we do not interpret it as removing the limitation that the Quinn court placed on its own holding: In large buildings, situations can arise in which the general rule will not be applied because it does not make sense. That was the law in 1878 and is the law today.
III
We must now decide whether the two burglaries defendant here committed — the burglary of the locker room in the late evening of October 6, and of Madame Tussaud’s Wax Museum in the early morning of October 7 — fit within the general rule of *630Quinn or within the Astor House exception. We hold them both to be within the general rule, though the case is close as to the second burglary.
The first burglary took place in a locker room that was part of the hotel, though not in the immediate neighborhood of the rooms where guests slept. Defendant went from the locker room to stairway E, which, the jury could find on this record, provides a means of reaching all floors of the hotel. He then passed through the 16th floor, which — again drawing reasonable inferences from the record — is adjacent to the floors containing guest rooms, and entered stairway D, which also led to guest room floors. We have little hesitation in concluding that the risks inherent in burglary of a dwelling — the “night terror” and the danger of violence that we spoke of in Quinn — are present when a burglar comes this near to rooms in which people are sleeping.
The wax museum is much less near to the sleeping rooms. Indeed, we might well hold that a burglar who entered Madame Tussaud’s from the street, and never entered the stairwell it shared with the hotel, committed only third degree burglary. But here, the jury could find that defendant entered the wax museum by coming down stairway D from the hotel, and the jury could also find that he could easily have returned by that route and reentered the hotel at the 14th floor lobby level. There was evidence that the door on the 14th floor between the hotel and stairway D was not locked from either side, though it was equipped with a motion detector. We find this evidence sufficient, though just barely, to support the jury’s verdict. Though the burglary was not physically close to the guest rooms of the hotel, the ease of access from one place to another is at least equally important. Defendant’s unlawful presence in Madame Tussaud’s gave him sufficient access to the hotel’s sleeping quarters to make the October 7 burglary the burglary of a dwelling.
Defendant’s claim that he was improperly sentenced lacks merit.
Accordingly, the order of the Appellate Division should be affirmed.
Chief Judge Lippman and Judges Graffeo, Read, Pigott, Rivera and Abdus-Salaam concur.Order affirmed.