Maryland Family Law Section 5-508
§ 5-508.
  (a)   Except as otherwise provided in this section, a person shall be licensed by the Administration as a child care home before the person may exercise care, custody, or control of a minor child.
  (b)   This section does not apply:
    (1)   to a parent of the child;
    (2)   to an individual related to the child by blood or marriage within five degrees of consanguinity or affinity under the civil law rule;
    (3)   to a guardian of the child;
    (4)   to a person who exercises temporary care, custody, or control over the child at the request of a parent or guardian of the child and who is not required otherwise to be licensed;
    (5)   to an individual with whom the child is placed in foster care by:
      (i)   a child placement agency that is licensed under § 5-507 of this subtitle;
      (ii)   a local department;
      (iii)   the Department of Juvenile Services;
      (iv)   the Secretary of Health and Mental Hygiene; or
      (v)   a court of competent jurisdiction;
    (6)   to a person who has the care, custody, or control of the child through placement for adoption by a parent or grandparent of the child, if the requirements of § 5-507(c) of this subtitle are met;
    (7)   to an institution that has a child care institution license under this subtitle or under Article 83C, § 2-124 of the Code; or
    (8)   to an institution that is operated by an agency of this State or any political subdivision of this State.