Federal authorities say Massachusetts child welfare officials discriminated against a young mother with a mild developmental disability when they took her daughter into state custody two days after she was born.

The Justice Department and U.S. Department of Health and Human Services, in a recent joint investigation, said the state Department of Children and Families must give her a chance to prove she can care for her daughter — or it may face a federal lawsuit.

Advocates for the disabled say the case points up a growing problem: states unnecessarily taking into custody the children of disabled parents.

Lawyers for the family say they have a plan in place to care for the child that includes naming the grandparents as legal guardians.