Either one of the separated parents may petition a circuit court in Maryland for custody of a child. If the parties cannot agree about who should have custody, the court will grant custody either solely to one of the parents or joint custody to both of the parents.