Maryland Family Law Section 5-1038
(a)   (1)   Except as provided in paragraph (2) of this subsection, a declaration of paternity in an order is final.
(2)   (i)   A declaration of paternity may be modified or set aside:
1.   in the manner and to the extent that any order or decree of an equity court is subject to the revisory power of the court under any law, rule, or established principle of practice and procedure in equity; or
2.   if a blood or genetic test done in accordance with § 5-1029 of this subtitle establishes the exclusion of the individual named as the father in the order.
(ii)   Notwithstanding subparagraph (i) of this paragraph, a declaration of paternity may not be modified or set aside if the individual named in the order acknowledged paternity knowing he was not the father.
(b)   Except for a declaration of paternity, the court may modify or set aside any order or part of an order under this subtitle as the court considers just and proper in light of the circumstances and in the best interests of the child.