The 99-cent store with the bright red awning cannot compete with the cutthroat pricing or huge selection at the two Dollar Tree outposts in its poor Brooklyn neighborhood.

So it has found another way to lure customers: with the personalized service usually associated with luxury stores.

After one woman requested a reusable lint brush, it began stocking them for 99 cents. It saves items for customers until they can pay for them. It anticipates their needs with air-conditioners in summer, heaters in winter and roses on Valentine’s Day. And it even offers a self-serve coffee stand where they can linger.

“It’s evolved beyond just being a 99-cent store,” said Habib Abdul Musiwir, the manager of 99¢ & Up Millenium Discount & Party Supply in East New York, whose customers have gone to check out the Dollar Tree stores only to return. “We’re meeting the needs of the community.”

Small family-owned dollar stores are under enormous pressure to hold onto customers and remain solvent as national chains like Dollar Tree expand their footprint in New York City and elsewhere, a trend underscored by Dollar General’s recent move to open stores in the city for the first time. Some independent stores have emphasized their neighborhood roots, while others have raised prices or tweaked their inventories beyond party supplies and off-brand shampoos to include household staples like bread and milk and even organic foods.

But just as supermarket and drugstore chains have reshaped local economies and wiped out many small businesses, dollar store chains are beginning to take over neighborhoods where mom-and-pop dollar stores have traditionally dominated. Many independent store owners and workers say they are facing a bleak future as their customers have more choices, and rising rents and operating costs further cut into their dwindling profits.

“The chains are growing rapidly at the expense of the independents — when they open up one chain store, they destroy five or 10 independent stores,” said David Emrani, the owner of Pride Products Corporation, which imports general merchandise and distributes it to about 3,000 independent dollar and discount stores nationally, about half the number from a decade ago.

Mr. Emrani himself owned six dollar stores on Long Island in 2008, but closed all but one of them after Dollar Tree chain stores opened nearby and not only poached some of his workers but also took away his customers. “You constantly have to ring up — if you don’t, you die,” he said. “You have to have more and more customers every day to survive.”

In the Bronx, where independent stores compete against one another as well as the chains, the 99¢ Super Star Discount store is not as busy as it used to be, even though it caters to its largely Hispanic and black neighborhood by carrying Goya agua de coco, Jarritos mango drink, canned beans and guava-flavored snacks, said Sam Essaedi, the manager.

Across the street, 99-Cent and Up Dollar R Us has raised some of its prices to eke out more profit. Muhammed Showaiv, the manager, counted five dollar stores just in the neighborhood, adding, “There’s not enough shoppers for the business.”

Over all, the dollar store industry is thriving at a time when the brick-and-mortar retail landscape is littered with shuttered stores. Promising deep discounts, these stores flourished during the recession and have continued to multiply at a time of seismic shifts in consumer habits and fierce competition from online retailers, especially Amazon, which recently started offering discounts to poorer families for its Prime membership, which covers the cost of shipping.

Nationally, 30,496 dollar stores rang up $33.8 billion in…