A Bronx mother who was separated from her child for smoking marijuana will receive a payment from the city’s child welfare agency as part of an agreement to settle a discrimination lawsuit, officials said.

After testing positive for cannabis following the birth of her baby boy in August 2021, the city’s Administration for Children’s Services forcibly separated the newborn from his mother, Chanetto Rivers, even though cannabis was legal in New York at the time and state law forbids family separation on that basis alone, according to her federal lawsuit.

Even after a judge intervened to reunite the family, ACS continued to pursue its case against Rivers for months, before finally withdrawing the charges.

“I didn’t just bring this lawsuit for myself, but for every Black family that ACS has ripped apart,” Rivers said. “They know what they did was wrong. And now, they’re on notice.”

The birth of Rivers’ third child was supposed to be a happy occasion. But once she told doctors and nurses in a hospital maternity room that she had smoked marijuana hours earlier at a family cookout, everything changed, according to the lawsuit.

Both Rivers and the baby tested positive for the drug after a test for marijuana was taken without her consent, according to the lawsuit.

Two days later, the child welfare agency ordered the hospital not to release the baby to Rivers, her lawyers said. Nearly a week passed, with multiple trips to court and a judge’s order before she finally gained custody of her son.

But her trouble didn’t end there. For another three more months, her lawyers said, the agency required her to take classes in parenting and anger management — and more drug tests. Caseworkers came to her apartment unannounced at random hours, including in the middle of the night.

Her lawyers said Rivers was singled out because she is Black.

“We are glad that Ms. Rivers was able to call attention to ACS’s deplorable history of racial discrimination against marginalized families — particularly those in the Bronx,” said Niji Jain, Director of the Impact Litigation Practice at The Bronx Defenders.

“This resolution shows that ACS can no longer hide from accountability, and we will continue to fight alongside New Yorkers until ACS’s deliberate targeting of Black and Brown families ends.”

An ACS spokeswoman said the agency was just looking after the child’s safety.

“In all of our cases, including those with substance misuse allegations, we assess child safety on a case-by-case basis, looking at actual or potential harm to a child and the parent’s capacity to care for the child,” the spokeswoman said in a statement.

“State and city policy is that a parent’s use of marijuana is not in and of itself a basis for indicating a report or filing a neglect case. This means that a case should not be indicated solely because a parent is using marijuana, but instead a child protective specialist should assess the impact, if any, on the safety and well-being of the child.”

The state’s Marijuana Regulation & Taxation Act (MRTA) was signed into law on March 31, 2021 legalizing cannabis use for adults. Backers of the bill said it was designed in part to undo the devastating consequences of the failed “War on Drugs,” waged largely against Black and Hispanic communities.