Md. Code, Real. Prop. § 14-103

Current with changes from the 2021 Legislative Session through Ch. 42
Section 14-103 - Court-ordered sales
(a) If a legal or equitable interest in land is sold under an execution sale, judicial sale, or foreclosure sale except a sale under Title 14, Chapter 200 of the Maryland Rules, and a deed is executed and delivered to the purchaser by the sheriff, trustee, agent, or other officer making the sale, the grantee in the deed, when recorded, is entitled to the same protection against the legal or equitable interests of persons not of record as is provided in this article for the benefit of grantees in deeds voluntarily executed, delivered, and recorded.
(b) If there is a decree for the sale of any reversion in lands to which rent is incident, the court may order any rent in arrears to be sold with the estate and the purchaser may recover the rent by distress, entry, or action, as if he was owner of the estate when the rent accrued.
(c) If a sale is made on credit, the court, on application of the mortgagee or creditor, may direct any bond taken in consequence of the sale to be assigned to the mortgagee or creditor and the assignee may sue on the bond in his own name.
(d) The court may decree a sale of an equitable title in any case where a decree for the sale of the legal title could be passed. The purchaser of the equitable title has the same remedy for obtaining the legal title as the person whose equitable interest he purchased would have had if no sale had been made.
(e) If property is sold pursuant to a judicial decree, all costs of the proceedings accruing up to and including the final ratification of the sale shall be paid prior to the final ratification of the first auditor's account after the sale. The costs shall include the fees for recording all papers which are proper to be recorded by law. After payment of the costs, the clerk of the court shall record all the proper required papers.
(f)
(1) In Baltimore City, if a foreclosure sale under a mortgage or a deed of trust of an interest in land is ratified, the person making the sale shall cause to be recorded in the land records a copy of the final order of ratification within 90 days of the date of the final order of ratification if:
(i) The vendor and the purchaser are the same; and
(ii) A deed is not recorded.
(2) The copy of the final order of ratification shall include the name and address of the purchaser.
(3) This subsection does not apply to a foreclosure that is subject to a stay issued by a court in a bankruptcy proceeding.

Md. Code, RP § 14-103