(a) (1) (i) Where an unexpired lease for a stated term provides that the landlord may repossess the premises prior to the expiration of the stated term if the tenant breaches the lease, the landlord may make complaint in writing to the District Court of the county where the premises is located if:
1. The tenant breaches the lease;
2. A. The landlord has given the tenant 30 days’ written notice that the tenant is in violation of the lease and the landlord desires to repossess the leased premises; or
B. The breach of the lease involves behavior by a tenant or a person who is on the property with the tenant’s consent, which demonstrates a clear and imminent danger of the tenant or person doing serious harm to themselves, other tenants, the landlord, the landlord’s property or representatives, or any other person on the property and the landlord has given the tenant or person in possession 14 days’ written notice that the tenant or person in possession is in violation of the lease and the landlord desires to repossess the leased premises; and
3. The tenant or person in actual possession of the premises refuses to comply.
(ii) The court shall summons immediately the tenant or person in possession to appear before the court on a day stated in the summons to show cause, if any, why restitution of the possession of the leased premises should not be made to the landlord.
(2) (i) If, for any reason, the tenant or person in actual possession cannot be found, the constable or sheriff shall affix an attested copy of the summons conspicuously on the property.
(ii) After notice is sent to the tenant or person in possession by first-class mail, the affixing of the summons on the property shall be conclusively presumed to be a sufficient service to support restitution.
(3) If either of the parties fails to appear before the court on the day stated in the summons, the court may continue the case for not less than six nor more than 10 days and notify the parties of the continuance.
(b) (1) If the court determines that the tenant breached the terms of the lease and that the breach was substantial and warrants an eviction, the court shall give judgment for the restitution of the possession of the premises and issue its warrant to the sheriff or a constable commanding the tenant to deliver possession to the landlord in as full and ample manner as the landlord was possessed of the same at the time when the lease was entered into. The court shall give judgment for costs against the tenant or person in possession.
(2) Either party may appeal to the circuit court for the county, within ten days from entry of the judgment. If the tenant (i) files with the District Court an affidavit that the appeal is not taken for delay; (ii) files sufficient bond with one or more securities conditioned upon diligent prosecution of the appeal; (iii) pays all rent in arrears, all court costs in the case; and (iv) pays all losses or damages which the landlord may suffer by reason of the tenant’s holding over, the tenant or person in possession of the premises may retain possession until the determination of the appeal. Upon application of either party, the court shall set a day for the hearing of the appeal not less than five nor more than 15 days after the application, and notice of the order for a hearing shall be served on the other party or that party’s counsel at least five days before the hearing. If the judgment of the District Court is in favor of the landlord, a warrant shall be issued by the court which hears the appeal to the sheriff, who shall execute the warrant.
(c) (1) Acceptance of any payment after notice but before eviction shall not operate as a waiver of any notice of breach of lease or any judgment for possession unless the parties specifically otherwise agree in writing.
(2) Any payment accepted shall be first applied to the rent or the equivalent of rent apportioned to the date that the landlord actually recovers possession of the premises, then to court costs, including court awarded damages and legal fees and then to any loss of rent caused by the breach of lease.
(3) Any payment which is accepted in excess of the rent referred to in paragraph (2) of this subsection shall not bear interest but will be returned to the tenant in the same manner as security deposits as defined under § 8-203 of this title but shall not be subject to the penalties of that section.