Long Creek Youth Development Center in South Portland is pictured on Nov. 17, 2016. Credit: Troy R. Bennett / BDN

AUGUSTA, Maine — A proposal to close Maine’s youth detention center cleared the Maine House of Representatives on Thursday, handing a milestone win to criminal justice activists even as the bill faces a hard path passage amid opposition from the state.

The push to close Long Creek Youth Development Center has been building for years. Advocates have argued the South Portland jail is too large and expensive for fewer than 30 kids, arguing children would be better served in community support systems keeping them closer to home, as a task force recommended last year. That report also recommended the state create a limited secure detention center to house youth who pose a threat to public safety.

It was enough to persuade lawmakers in the House to support the bill despite stiff opposition from Gov. Janet Mills’ administration, which has said closing the center is not in the state’s best interest. A motion to pass the bill passed in an 81-57 vote after a half-hour debate. It faces further action in both chambers.

The Maine Department of Corrections has a plan to reduce youth confinement, build more community programs and create regional care teams. But proponents were frustrated by the pace of reform and argued closing the center would provide better care for children. The bill, should it become law, would require the department to wind down the center by 2023.

The vote went largely along party lines, with all but three Democrats backing the measure and all but two Republicans opposing it. Four independents backed it as well. House Speaker Ryan Fecteau, D-Biddeford, was among the lawmakers who defected from his party on the item.

“We have the opportunity before us with this bill to do something monumental and change the way we support youth that fall through the cracks and end up in the juvenile justice system,” said Rep. Grayson Lookner, D-Portland, the sponsor of the bill.

Scrutiny of the center has been building after a transgender boy died by suicide under the center’s care in 2016. People have criticized the number of children in its care, many of whom have mental illnesses. A study released last year found more than half of children there were housed because they could not go home. Staffing shortages exacerbated those problems as the state struggled to hire people who were trained to work with the children.

Opponents of the bill said the state should be allowed to follow its plan and that closing the center would give the youth nowhere to go, creating a public safety risk.

“Whether they are in a secure facility where they cannot create crimes or they’re in the streets breaking into your car or your house or committing other crimes … we are paying for it either way,” said Rep. Matthew Harrington, R-Sanford.