BILLERICA -- Town officials admit that the Middlesex House of Correction expansion project has been a "nagging concern," but selectmen made the most out of the situation Monday night by agreeing to financial and non-monetary returns that would benefit the town.

The five selectmen unanimously agreed to the conditions of the agreement that would provide the town with more than $4 million, a traffic light, the potential to receive $2.3 million to rehab Boston Road and construct sidewalks, as well as the possibility to remove the word "Billerica" from all the signs at the sheriff's facility.

The "memorandum of agreement" still needs final approval from the state, acting through the Executive Office of Administration and Finance (EOAF) and the Division of Capital Asset Management and Maintenance (DCAMM).

"Nobody wants this facility, but we needed to leverage the situation and these were channels open to us," said Town Manager John Curran. "It's a good, comprehensive plan for the town. This kind of return is very good.

"There were some hiccups in the beginning of the process, but as of late, we've had negotiations in good faith with the commonwealth," he added.

Receiving mitigation from the jail expansion project has been a hot topic in Billerica for months, especially because of the sewer permit issue.

In August, selectmen appealed the Massachusetts Department of Environmental Protection's decision to grant a permit for increased sewer capacity for the Middlesex House of Correction without giving the town a public hearing.

Curran requested in July that DEP deny the proposed sewer permit, stating in a letter that the jail-expansion project was not included in the town's long-term sewer planning and "the additional flow simply cannot be accommodated." Selectmen also requested a public hearing, so the town and other interested parties get the chance to comment publicly on the proposed permit.

However, MassDEP said it's granting the increased sewer permit and there's no need for a public hearing. The current flows to the wastewater-treatment plant are considerably under the permit limit, which means DEP cannot deny the sewer pemit.

DCAMM, on behalf of the Middlesex Sheriff's Office, applied in June for the sewer permit that would allow 99,200 gallons per day from the $37 million expansion facility.

About 25 percent to 30 percent of Billerica residents remain off the town's sewer system, Curran said.

The additional 496 beds at the expansion facility will be temporary, Middlesex Sheriff Peter Koutoujian said. He stressed that pretrial detainees in Billerica will be temporary until officials find a suitable 5-acre site to build the Southern Middlesex Justice Center.

Follow Rick Sobey on Twitter and Tout @rsobeyLSun.