CONCORD, N.H. (AP) — The state Senate gave preliminary approval Thursday to legislation that would keep New Hampshire’s troubled youth detention center open for nearly two more years.

Debate over the future of the Sununu Youth Services Center in Manchester began years ago, but it has come to a boil amid horrific sexual abuse allegations stretching back decades. Frustrated with spending $13 million a year to operate a 144-bed facility for about a dozen teens, lawmakers in 2021 mandated that it close by March 2023. But disagreements over how to replace the facility made meeting that deadline impossible, and lawmakers are now considering several bills to extend.

The proposal sent to the Senate Finance Committee on Thursday would require the state to put the project out to bid by March, with construction of a new facility completed by November 2024. The new center would be built for 12 residents, with room for up to 18 if necessary.

The bill would allocate $15 million in federal American Rescue Plan Act funds for design and construction, though the Department of Administrative Services estimates costs could reach $25 million and construction could take until 2028.

Lawmakers haven’t decided where to build the new facility but have mentioned Manchester, Concord or Hampstead as possibilities. In 2021, the state purchased Hampstead Hospital with the goal of transforming it into a residential and psychiatric treatment hospital for children and young adults.

Two senators voted against the bill: Sen. Daryl Abbas of Salem and Sen. Regina Birdsell of Hampstead.

“My biggest issue right now is the security piece of it,” said Birdsell, who noted that Hampstead is a 35-minute drive from the nearest state police barracks. Last week, it took 12 hospital staffers and four or five local police officers to handle a girl who ran away, she said.

Republican state Sen. Sharon Carson, of Londonderry, acknowledged those concerns but emphasized that the new facility, unlike the hospital, would be secure. And Democratic state Sen. Becky Whitley, of Hopkinton, urged colleagues to remember the trauma many children have faced in and outside the facility.

“We have come to this point after decades of documented and deeply troubling abuse,” she said. “Money matters. Security matters. But to me what is most important are children. While these children are often difficult, we know that they deserve our passion, our support and our commitment to do better.”