BANGOR, Maine — The Victorian-era Bangor Waterworks sat vacant on the edge of the Penobscot River for decades while groups attempted to redevelop its dark and damp historic buildings into something useful.

The 1875 buildings, first used for water filtration and, later, power generation, closed in the mid-1970s, and since then developers have attempted to change the complex into office space, a hotel, a restaurant, apartments, a hydroelectric plant, and even a freshwater aquarium and teaching facility.

None was successful until a multifaceted partnership decided to restore the brick buildings into 35 rent-subsidized efficiency apartments for low-income adults who are at risk of homelessness.

Maine Preservation recently gave accolades to the group for its tireless work, Greg Paxton, Maine Preservation’s executive director, said on Monday.

“This particular project is one of the finest examples of collaboration that I’ve [ever] seen in historic preservation,” he said. “All of the partners worked on a very difficult project, with difficult legal issues to overcome. They persisted and persevered.”

Shaw House Development, the city of Bangor, Bangor Savings Bank, the Maine State Housing Authority, WBRC Architects and Engineers of Bangor, and Nickerson & O’Day, a Brewer contractor, were recognized for “Excellence in Residential Rehabilitation and Adaptive Use of Bangor Waterworks” by Maine Preservation.

Bangor Waterworks was on the Maine Preservation most endangered list since 1999. Now it is listed as saved.

City officials were surprised to be named in the honors, said Dan Wellington, the city’s code enforcement officer.

“It was a team effort that made the project work,” he said. “We got into quite a wrangle over the [railroad] right of way.”

The city invested around $1 million of the $6.5 million renovation to improve the roadway, add a traffic light at the exit, level the ground and create a pedestrian crossing at the railroad tracks, Wellington said.

Community Development Block Grant funds also were used, he said.

Karl Ward, Nickerson & O’Day’s president, said his company is proud of the work it did.

“It was quite an honor to us to get,” he said.

Work on the site continues with renovation of the old engineer’s home, located by the site’s exit, which was designed by renowned architect Wilfred E. Mansur, Wellington said. No decisions about what the building will be used for have been made, he said.

Without the six-facet partnership, the Waterworks project probably would have stayed on the endangered list, Paxton said.

“We felt that all had persevered and all were in it together,” he said. “And each participant deserved the award. It was a very deserving project considering the condition of the building and all the obstacles they had to overcome.”