It’s been 120 years since the Noyes Building on Pennacock avenue first opened its doors to the Oak Bluffs community, serving as a post office, a market and most recently a library. And now it houses Conroy’s Apothecary and three affordable housing apartments, welcoming lower income families into a more urban neighborhood.

Nearly 100 people gathered at the building Wednesday evening to celebrate its grand opening. Beer, wine and goodies in hand, community members wandered around the new apartment building, gasping at the transformation of the old building into a studio, one-bedroom and two-bedroom apartments.

“It was great to watch it rise from the dust,” said Harvey Beth, a member of the board for the Island Affordable Housing Fund. “You take what was a dilapidated building and gave it new life, but it still looks old,” Oak Bluffs selectman Ron DiOrio added. “It fits perfectly into the neighborhood. It fits into a smart growth plan, you don’t need a car . . . It’s a perfect example of acting smart and thinking smart.”

The apartments have prefinished maple wood floors, high ceilings, carpeted bedrooms and open kitchens and living rooms. The architecture of the building allows for curved sitting areas and plenty of natural light. The two-bedroom apartment accessible for people with handicaps is based on the ground floor.

Mr. DiOrio said the town has received about 10 applications for the apartments, and a lottery drawing will be held next week. “We’re really thrilled three households get to live here and be able to afford it,” grant writer Alice Boyd said. “There’s nothing better than that.”

Because it was a historic building, special needs came into consideration. Brian Hanes of the Hayes Group, who was the contractor for the project alongside developer The Resource Inc., said they had to replace the unstable foundation but otherwise kept the structure intact.

“When we got here it was a skeleton. The second floor was sagging from the roof,” Mr. Hanes said. “It was complete junk.”

The Hayes Group gutted the building and replaced it with new appliances, some of which were put in hours before the grand opening. “It’s basically done,” Mr. Hanes said. Landscaping and final painting were done this week.

Adam Wilson spoke of the town’s commitment to preservation. “$474,000 from the Community Preservation Act helped to secure other funding from the state,” he said. “We spent more to preserve the building than it would to knock it down and rebuild it . . . but the community was adamant that the building be preserved,” he added.

“It’s a great, solid building,” John Curran from the state Department of Housing and Community Development said. “I walked around upstairs and there wasn’t one creak.” Mr. Curran provided critical assistance on the state level for funding. Oak Bluffs selectman Kathy Burton thanked him for “going to battle for them.”

“I’ve watched the project go up and they put it together so well, it fits right into the neighborhood,” Oak Bluffs resident Holly Alaimo said. “It’s a great addition,” she added.

“We have a pharmacy!” she cheered of the addition of Conroy’s to the town. “It’s really important.” Mr. DiOrio agreed. “We’re excited the pharmacy is here. It becomes a great anchor as you make Oak Bluffs a year-round town,” he said.

“I’m so proud to be a part of a community that supports projects like this,” Ms. Burton told the crowd. “Congratulations to the citizens of Oak Bluffs who wanted their tax dollars to go to this project.”

At the back of the crowd stood Alfred Noyes, whose great-grandfather built the building originally in 1895, and his daughter, Cindy. “I think it’s wonderful,” Ms. Noyes said. “They did a beautiful job,” Mr. Noyes agreed. “My great-grandfather would have been proud to have this here.”