The Long Creek Youth Development Center in South Portland.

A Portland mother who sued Maine’s youth prison claiming that two guards knocked out her son’s teeth while he was incarcerated there in July 2017 has reached a settlement with the Department of Corrections and the facility’s medical provider.

The state has agreed to pay $250,000 into a trust fund for the boy, now 14, according to the proposed settlement agreement, filed Monday in federal court in Portland.

The amount to be contributed by Correct Care Solutions, the medical provider at Long Creek Youth Development Center in South Portland, is confidential and has been redacted.

About $50,000 of the total settlement will go to legal fees and to repay MaineCare for $480 in dental bills, the settlement said. The rest will be placed into a special needs trust for the boy’s sole benefit.

The lawsuit was filed by the ACLU of Maine in March 2018 on behalf of Sadiya Ali and her son, referred to court documents as A.I. She claimed the staff at the Long Creek “bashed” her son’s face into a metal bed frame while he was locked in his cell alone and then “deliberately withheld” emergency dental treatment.

The state and Long Creek’s medical provider denied the allegations. Their attorneys claimed that the boy, then 11, spit at two guards and when they attempted to turn A.I around, he tripped over his bed and hit his mouth on the metal bed frame. They also said that medical assistance was provided “promptly” once A.I.’s injury became apparent.

The proposed settlement must be approved by U.S. District Judge John Woodcock before the case is closed.

Marc Malon, spokesman for the Maine attorney general’s office, declined Monday to comment on the settlement. A request for comment from the attorney for Correct Care Solutions was not immediately returned.

Rachel Healy, spokeswoman for the ACLU of Maine, also declined to comment.

The settlement in the federal lawsuit will not affect a case pending before the Maine Supreme Judicial Court that challenged the state’s ability to keep A.I. at Long Creek after he was found earlier this year not competent to be tried on misdemeanor charges but likely to be returned to competency.

The boy has been in and out of Long Creek since he was 11. In August, he was moved to Becket’s Mount Prospect Academy in Plymouth, New Hampshire, after the state could not find a residential treatment facility in Maine that could meet his needs.

If he had been an adult and found incompetent but likely to be restored to competency, he most likely would have been moved to Riverview Psychiatric Center in Augusta for evaluation and treatment in a hospital setting.

A.I.’s prolonged detention has helped fuel a discussion about the state’s juvenile justice system. Some have called for Maine’s last juvenile detention center to be shut down and for more money to be spent on building residential treatment facilities.

A task force is studying alternatives to incarceration for juveniles, including young people at risk of being involved in the justice system, with a report due to the Legislature by early 2020.