It used to be that tenants could hardly get a good night's sleep at Hunter Gardens Apartments.

For years, the Anacostia apartment complex has been plagued by drug trafficking, shootings and loiterers who frequently slept in the graffiti-laden hallways, residents said.

"My nerves had gotten really, really bad," said Pauline Y. Gregg, 36, a resident for eight years. "Between the gunshots, the people running, the stick-up boys and the rats, I was ready to just give up."

On Sunday, residents and owners at the 72-unit low- to moderate-income complex in the 2200 block of Hunter Place SE heralded the beginning of a new era with a symbolic ribbon-cutting ceremony in the parking lot.

The turnaround was brought about by a six-month, $2 million renovation made possible in part through the Apartment Improvement Program, a local nonprofit group funded by the D.C. Department of Housing and Community Development. The 11-year-old group helps owners of low- and moderate-income apartments obtain commercial loans to renovate, which officials say is key to increasing the amount of affordable housing in the city.

The improvements at Hunter Green will increase some rents, the owner said, but the increases were approved as required by 70 percent of the tenants and will primarily affect new tenants. Current tenants will now have to pay their own gas bills.

"It is much better than what it was," said Alphonso Wilson, a 10-year resident.

Douglas K. Goldsten, who purchased the 24-year-old complex for about $700,000 last January, said he and his partner Mason Wager installed new lights outside, added new apartment locks, repaired doors, cleaned the hallways and served 30-day notices to noisy and unruly residents.

"It was awful," Goldsten said. "It's not to say there's no problem there now, but it's just a difference of night and day."

Ray M. Slade, a loan placement officer for the Apartment Improvement Program, said this type of turnaround is the goal of his organization.

"Our mission is to preserve existing rental housing for low- to moderate-income residents," he said. The program helps to get improvement loans for owners and to organize tenants in rent-controlled properties to consider increases in exchange for refurbishing. Work is done without displacing residents, although temporary moves within the complex are often needed.

Program officials said they have helped rehabilitate hundreds of units in the city, including Oxon Run Manor at 207-221 Mississippi Ave. SE, and the Woodridge Apartments at 1814-1816 Irving St. NE.

"We work with them to package the loans to make it look attractive" to an investor, said Michele Higgs of AIP. Hunter Gardens "was in really bad shape," she said.

Residents said much work still needs to be done, including floor repairs, locks on the main entrance doors and the addition of wall-to-wall carpeting in occupied units. But already the landscaping and upgrades make them feel different about where they live. "You feel better when you go home," Gregg said. "We don't hear as many gunshots like we used to. It's really much more peaceful."