Unlawful detention means keeping in custody unlawfully. Under criminal law it means keeping or confining a person in custody without any lawful reason. In civil law it is keeping in custody real property to which one is not entitled. A person is guilty of unlawful detention of real property when entry is made wrongfully without any right or title into any vacant or unoccupied lands tenements or other possessions.

In Colorado C.R.S. 13-40-104 defines Unlawful detention as follows:

13-40-104. Unlawful detention defined

(1) Any person is guilty of an unlawful detention of real property in the following cases:

(a) When entry is made, without right or title, into any vacant or unoccupied lands or tenements;

(b) When entry is made, wrongfully, into any public lands, tenements, mining claims, or other possessions which are claimed or held by a person who may have located, entered, or settled upon the same in conformity with the laws, rules, and regulations of the United States, or of this state, in relation thereto;

(c) When any lessee or tenant at will, or by sufferance, or for any part of a year, or for one or more years, of any real property, including a specific or undivided portion of a building or dwelling, holds over and continues in possession of the demised premises, or any portion thereof, after the expiration of the term for which the same were leased, or after such tenancy, at will or sufferance, has been terminated by either party;

(d) When such tenant or lessee holds over without permission of his landlord after any default in the payment of rent pursuant to the agreement under which he holds, and three days' notice in writing has been duly served upon the tenant or lessee holding over, requiring in the alternative the payment of the rent or the possession of the premises. No such agreement shall contain a waiver by the tenant of the three days' notice requirement of this paragraph (d). It shall not be necessary, in order to work a forfeiture of such agreement, for nonpayment of rent, to make a demand for such rent on the day on which the same becomes due; but a failure to pay such rent upon demand, when made, works a forfeiture.

(d.5) When such tenant or lessee holds over, without the permission of the landlord, contrary to any condition or covenant the violation of which is defined as a substantial violation in section 13-40-107.5, and notice in writing has been duly served upon such tenant or lessee in accordance with section 13-40-107.5;

(e) When such tenant or lessee holds over, without such permission, contrary to any other condition or covenant of the agreement under which such tenant or lessee holds, and three days' notice in writing has been duly served upon such tenant or lessee requiring in the alternative the compliance with such condition or covenant or the delivery of the possession of the premises so held;

(e.5) (I) When a tenant or lessee has previously been served with the notice described in paragraph (e) of this subsection (1) requiring compliance with a condition or covenant of the agreement, and subsequent to that notice holds over, without permission of the tenant or lessee's landlord, contrary to the same condition or covenant.

(II) A tenancy may be terminated at any time pursuant to this paragraph (e.5) on the basis of a subsequent violation. The termination shall be effective three days after service of written notice to quit.

(f) When the property has been duly sold under any power of sale, contained in any mortgage or trust deed that was executed by such person, or any person under whom such person claims by title subsequent to date of the recording of such mortgage or trust deed, and the title under such sale has been duly perfected and the purchaser at such sale, or his or her assigns, has duly demanded the possession thereof;

(g) When the property has been duly sold under the judgment or decree of any court of competent jurisdiction and the party or privies to such judgment or decree, after the expiration of the time of redemption when redemption is allowed by law, refuse or neglect to surrender possession thereof after demand therefor has been duly made by the purchaser at such sale, or his or her assigns;

(h) When an heir or devisee continues in possession of any premises sold and conveyed by any personal representative with authority to sell, after demand therefor is duly made;

(i) When a vendee having obtained possession under an agreement to purchase lands or tenements, and having failed to comply with his agreement, withholds possession thereof from his vendor, or assigns, after demand therefor is duly made.

(2) and (3) Repealed.

(4) (a) It shall not constitute an unlawful detention of real property as described in paragraph (d.5), (e), or (e.5) of subsection (1) of this section if the tenant or lessee is the victim of domestic violence, as that term is defined in section 18-6-800.3, C.R.S., or of domestic abuse, as that term is defined in section 13-14-101 (2), which domestic violence or domestic abuse was the cause of or resulted in the alleged unlawful detention and which domestic violence or domestic abuse has been documented by the following:

(I) A police report; or

(II) A valid civil or emergency protection order.

(b) A person is not guilty of an unlawful detention of real property pursuant to paragraph (a) of this subsection (4) if the alleged violation of the rental or lease agreement is a result of domestic violence or domestic abuse against the tenant or lessee.

(c) A rental, lease, or other such agreement shall not contain a waiver by the tenant or lessee of the protections provided in this subsection (4).

(d) Nothing in this subsection (4) shall prevent the landlord from seeking judgment for possession against the tenant or lessee of the premises who perpetuated the violence or abuse that was the cause of or resulted in the alleged unlawful detention.