ANDREW MOJICA is a registered-for-life sex offender in Maryland. As such, he’s barred from knowingly entering a school or child-care facility without written permission. However, Mr. Mojica is allowed unsupervised visits, including overnight, with his 4-year-old son despite fierce objections from the boy’s mother. The anomaly — other words come to mind — is the result of cracks in state law and a court system seemingly so suspicious of any parent who seeks to limit another parent’s access to their child that it is willing to discount potential risks.

“The court has taken away my power to protect my son,” said Gloria Faulkner, the Talbot County woman who has been locked in a battle with her ex-husband over visitation. Less than two months after their son was born in 2009, Mr. Mojica was accused of sexually abusing a preteen girl related to Ms. Faulkner; he was convicted in 2010. The two divorced in 2012, following his release from jail. Neither was represented by an attorney in a decree that gave Ms. Faulkner sole legal and primary physical custody of the boy but that granted Mr. Mojica visitation rights.

Ms. Faulkner told us she didn’t know to object at the time and that subsequent efforts to amend the agreement have made matters worse. According to Ms. Faulkner, Mr. Mojica gets scheduled visits overnight every Wednesday and every other Friday and during the day every other Sunday. Her recent court efforts to curtail visits based on her allegations about changed behavior in her son and the fact another sex offender lives in the apartment building where her ex-husband resides have been unsuccessful; she told us she wants to require supervision, not banish the father from her son’s life.

“It is without question that the Defendant previously sexually assaulted the Plaintiff’s [relative]. Such behavior is reprehensible and without excuse,” Domestic Relations Master Jamie E. Adkins wrote on July 15. “However, there is no evidence currently before the Court that [the boy] is in need of protection from the Defendant.” The opinion by Ms. Adkins, who a court spokeswoman said would not comment on a pending case, concluded Ms. Faulkner did not meet “the threshold burden for the court to reconsider custody.” The master considered Ms. Faulkner’s claims of troubling and changed behavior by her son but found “minimal corroboration.”

Kevin M. Joyce, attorney for Mr. Mojica, said the father has “a constitutional right to raise the child.” He denied any suggestion that Mr. Mojica, who, Mr. Joyce stressed, was fully compliant with the law, was abusing or not properly caring for his son. He ascribed Ms. Faulkner’s efforts to redraw the custody agreement as “buyer’s remorse.”

Maryland law requires that in circumstances in which there has been a finding of child abuse or neglect, the court should determine whether future abuse or neglect is likely and, unless there is no likelihood, deny access or require supervision. The two parties disagree on how carefully this was weighed.

Child advocates pushed this year’s General Assembly to toughen the law. A bill sponsored by Del. Jeannie Haddaway-Riccio (R-Talbot) would have prohibited custody or visitation to child sexual offenders, except under certain circumstances where there was clear and convincing evidence that there was no danger to the child; supervised visits would have been allowed. It died in the House Judiciary Committee, a graveyard for similarly worthy bills that aim to better protect children and victims of domestic abuse.

What’s even more troubling than the weakness in state law — which we urge Maryland lawmakers to make haste in fixing — is the attitude by the professionals who run family courts that any parent is better than no parent. A corollary to that is the belief that a parent who warns of possible risks in wanting to limit contact has ulterior motives. The judge who will review this wrong-headed decision should apply common sense in deciding what interests are served in letting a 4-year-old sleep alone and overnight in a house with a registered sex offender.