> For AI agents: read the machine-readable documentation index at [https://corpuslaw.us/llms.txt](https://corpuslaw.us/llms.txt) or the single-file full reference at [https://corpuslaw.us/llms-full.txt](https://corpuslaw.us/llms-full.txt).

# N.Y. Penal Law § 140.17 — Criminal trespass in the first degree

- **Citation**: N.Y. Penal Law § 140.17
- **Node Type**: section
- **Jurisdiction**: New York (state)
- **Code Body**: Laws of New York (NY Senate Open Legislation, as published 2026-10-26) (N.Y. Laws)
- **Official Source**: [https://www.nysenate.gov/legislation/laws/PEN/140.17](https://www.nysenate.gov/legislation/laws/PEN/140.17)
- **Canonical URL**: [https://corpuslaw.us/codes/new-york/penal-law/article-140/section-140-17](https://corpuslaw.us/codes/new-york/penal-law/article-140/section-140-17)
- **Semantic URL**: [https://corpuslaw.us/codes/new-york/penal-law/article-140/section-140-17](https://corpuslaw.us/codes/new-york/penal-law/article-140/section-140-17)

## Hierarchy

Division PEN — Penal Law > Article 140 — BURGLARY AND RELATED OFFENSES

## Text

§ 140.17.

Criminal trespass in the first degree.

A person is guilty of criminal trespass in the first degree when he knowingly enters or remains unlawfully in a building, and when, in the course of committing such crime, he:

1. Possesses, or knows that another participant in the crime possesses, an explosive or a deadly weapon; or

2. Possesses a firearm, rifle or shotgun, as those terms are defined in section 265.00, and also possesses or has readily accessible a quantity of ammunition which is capable of being discharged from such firearm, rifle or shotgun; or

3. Knows that another participant in the crime possesses a firearm, rifle or shotgun under circumstances described in subdivision two.

Criminal trespass in the first degree is a class D felony.
