Independent booksellers, long the losers in the Internet war with Amazon, are seeing a modest rebound in their fortunes by being hyperlocal, diversifying into new products, and of course selling books online.

The American Booksellers Association, a trade group promoting independent booksellers, had 1,712 members as of May, an increase of 311 members - or 22 percent - since 2009.

Related stories

"There is no doubt about the resurgence of the independent bookstore," said Oren Teicher, CEO of the booksellers association. "There is a better environment for independent bookstores to the contrary of what people think."

Teicher said the growth was attributed to many factors: technology that has become cheaper and more accessible; a local focus that drives consumers to, well, shop local; and innovation that has driven booksellers to diversify.

"Stores are becoming more sophisticated and are adapting," he said. "A decade ago, technology was so expensive, small businesses didn't have access to it. Today it is cheaper, accessible, and easier to use. I tell member companies that if they want to be successful, they will also need to sell online, too."

At one point the e-book seemed poised to take over the market but recently has plateaued. E-book sales were 650 million in 2004 and hit 770 million in 2009 before falling back to 635 million in 2014, according to Nielsen Bookscan data.

"It is heartening, in my opinion, that the predictions about the end of print in the face of the rise of e-books have been vastly overstated," said Dorothea von Moltke, owner of Labyrinth Books in Princeton.

Von Moltke thinks the e-book lost its footing in part because studies show "we retain information better when we read on the page than on the screen."

"I would cautiously say books are becoming more beautifully designed and produced," she added.

Books also are selling because the public supports local businesses. "Many want to live in places that are diverse rather than generic and dominated by large corporate chain stores," von Moltke said.

Sheila Avelin, 44, opened Big Blue Marble Bookstore in Mount Airy in 2005 knowing that she was planting stilts in a tsunami. She sells toys and T-shirts to bolster sales, but books made up 83 percent of sales last year with 15,000 books sold.

"We opened with a business model that was developed to be functional," said Avelin, a high school English teacher-turned-bookstore owner. "The store is a community center. It's a space where you can hang out and feel comfortable."

Big Blue Marble's revenues went up by 6 percent from May last year, she said. Avelin does not have an online shop but uses her website to inform customers about events at her store.

"The thing is, we're not selling books; we're selling a way people can connect around books."

Philly AIDS Thrift @ Giovanni's Room, a nonprofit specializing in LGBT titles, embraces diversification.

Opened after its legendary successor, Giovanni's Room, closed in May 2014 following a 41-year run, the new venture stocks used books, clothes, gifts, and records, as well as housewares and art. It also sells new books on its website and rare used books on Amazon Marketplace, which enables merchants to set up a virtual shop and tap into that retailer's vast customer base. Diversification has helped the bookstore stay afloat, said manager Alan Chelak, 30.

In-store sales have gone up. In April, Giovanni's sold 135 new and 1,425 used books. In May, it sold 300 new and 2,000 used books.

"The independent bookstore survives because shopping is a cultural activity," Chelak said. "In physical stores, people have the advantage to browse. They walk in not knowing what to get, and sometimes they buy something they didn't expect to find. Whereas with online, people already know what they want."

Richard de Wyngaert, 56, owner of Head House Books in Queen Village, adapted his business to meet the needs of the online customer. "I can't compete with prices online, so I identify my strengths and focus on them," de Wyngaert said.

Those strengths, he said, are his curated selection of books, customer loyalty rewards program, and in-store ambience. If a book is not available in the store or online, a special order can be placed. Like online retailers, de Wyngaert has the same access to almost any title. Many booksellers are taking on this service.

Last month, Head House Books made more than 500 online, phone, and e-mail orders, a 40 percent rise from last year. Total revenues increased by 28 percent from last year, with in-store sales eclipsing online sales, he said.

Limited in-store space demands a tight selection, so "there has to be a balance," he said. "I always want to eclipse people's expectations. If I stocked all the common titles, people would just get them online. I want someone to walk in and be surprised at what they see and walk out with a book they didn't expect to walk out with."

Selling books is a low-margin business. Profits are small. On average, 50 to 60 percent of the sale of a book is its cost, 18 to 20 percent goes into salaries, and about 10 percent goes into rent and other overhead. So only about 10 percent is profit.

The chain bookstore Borders went bankrupt in 2011, and Barnes & Noble's retail division had earnings of $322 million, a 9 percent drop, for fiscal 2015.

Despite the riptide generated by online competitors, Teicher, the booksellers association CEO, dares to be hopeful. "There used to be the presumption in retail that bigger is better," he said, "but in a world where you need to change quickly, being smaller is an advantage."