Ally Kirkpatrick’s dog excitedly tried to make his way into the front door of an Alexandria, Va., home before his owner coaxed him back. The two were there to deliver books from Kirkpatrick’s nearby bookstore. The woman who answered the door immediately recognized the sweet, 8-year-old terrier mix, who is well-known to regulars at Old Town Books. “Oh hi, Scout!” she said with a smile.

It was unusual for Kirkpatrick to be spending a rainy morning last Sunday delivering customer orders, but it had been an unusual week. The president had declared a national emergency in response to an outbreak of the novel coronavirus that cause the disease covid-19. As the Centers for Disease Control and Prevention urged the public to avoid crowds, schools and businesses across the region announced temporary closures.

Kirkpatrick had been reading about Italy’s struggle to curtail the virus from growing exponentially, how healthy people unknowingly infected with the virus could be spreading it to those most at-risk. She had already canceled book clubs, author events and free story times through the weekend. “Why risk bringing groups of people together?” she said.

Kirkpatrick and her employees brainstormed ways to hold some events virtually (perhaps the popular Bad Romance Book Club could meet online). But her business — which relies on foot traffic from book clubs, author discussions and other events — was sure to take a hit. She cut shipping down to one dollar on the store’s website and offered free local delivery.

The coronavirus pandemic has had sudden and devastating implications across the retail industry, but there’s a sad irony to what is happening with independent bookstores. Against the odds, these small shops managed to thrive, despite the ascendancy of Amazon and online retailers, by relying on social interactions that public health experts are now warning against. (Amazon CEO Jeff Bezos owns The Washington Post.) To survive, they must step up their online presence — and make difficult decisions: canceling events and book orders, cutting employee hours, and turning to online sales to make up for lost foot traffic.

But for some booksellers, the impending losses have already proved catastrophic. Powell’s — the legendary chain of independent bookstores based in Portland, Ore. — said in a letter this week that it would lay off “the vast majority” of its employees. The announcement arrived just days after the company said it would temporarily close all five of its locations across the Portland area. “We have worked hard over the years to pay the best possible wages, health care and benefits, to make contributions to our community, to support other non-profits,” owner and CEO Emily Powell wrote. “Unfortunately, none of those choices leave extra money on hand when the doors close.”

Kirkpatrick, who grew up in Alexandria, brought Old Town Books to one of Alexandria's busiest districts as part of a pop-up program that gives short-term leases to small retailers. Her trial run, which began in November 2018, was so successful that the store was able to stay in the same cobblestone-walled space, just feet from the Potomac River.

Old Town Books hosted more than 100 events last year, including a literary festival, but the store offered little space for employee meetings or extra inventory. “We planned our whole literary festival last year in the electrical closet downstairs. We had Post-it notes in the bathroom,” Kirkpatrick recalled. “It was so classic indie bookstore.”

This year, with a packed slate of events on the horizon, Kirkpatrick expanded to the cozy space atop her shop. Leasing the light-filled studio increased her rent by thousands, but it basically “paid for itself,” Kirkpatrick said. The loft hosted more than 25 events in January alone. It was also where Kirkpatrick retreated, the day before her Sunday morning deliveries, to think of creative ways to keep her business afloat. She pictured curated book bundles that would help people facing an unanticipated few weeks in self-quarantine at home, maybe even a reading challenge for kids with books and a timer.

Now, she was wondering if her landlord or the city would offer any kind of help should she fall short of her monthly rent. Even as customers trickled in and out of the shop downstairs, Kirkpatrick prepared to take the drastic step of temporarily closing the store, as several other booksellers in the area had done.

Last Sunday, Solid State Books announced it would close to the public for an indeterminate amount of time starting the next day. The store, located on H Street in Northeast Washington, will still be staffed to take online orders for delivery or curbside pickup.

“This is not a decision that we’ve made lightly, as we cherish the role we play as a community hub,” owners Jake Cumsky-Whitlock and Scott Abel told customers in a newsletter. But, they added, “we feel it is the responsible step to take as we all attempt to practice ‘social distancing.’ ”

East City Bookshop announced Monday that it would be closing its sales floor until further notice. The Capitol Hill store has also cut shipping prices, in addition to expanding delivery and curbside-pickup options for customers. The W(h)ine and Angst book club was, perhaps fittingly, the last event to be held there this month.

“We are really a community bookstore,” said owner Laurie Gillman. “I feel like the community will support us in any way they can.”

MahoganyBooks in Southeast Washington will also be shuttered for the next couple of weeks as the Anacostia Arts Building, which houses the store, will be closed until April 1. The store’s temporary transition to exclusively online sales will be rather seamless — MahoganyBooks operated online for more than a decade before opening its bricks-and-mortar location. The shop usually live-streams its events, so it’s well-positioned to offer virtual discussions.

But Ramunda Young — who co-owns the store with her husband, Derrick — still expects sales to take a hit. And the loss of the store’s physical location, however temporary, is particularly significant in Anacostia, which had gone nearly two decades without a bookstore before the Youngs opened theirs in 2017. The store, which specializes in books for and by people of the African diaspora, often stocks titles that are hard to find in other bookstores. She and her husband are focused on letting customers know the shop’s selection is available to them even if the store is temporarily not.

“We’re still here. We’re still a resource,” she said.

Booksellers have been supporting one another, sharing advice and strategies through online forums. The American Booksellers Association, a not-for-profit trade organization, has compiled a list of coronavirus resources and tips for bookstore owners.

“Booksellers, like their customers, are hopeful that in the coming days there will be greater clarity about what we can expect regarding the scope and duration of this crisis,” Dan Cullen, senior strategy officer for the ABA, said in an email.

The organization is also calling on elected officials to help booksellers recover from the unexpected downturn. “Policy initiatives such as small business grants, payroll tax relief, rent relief, and support for paid leave for bookstore staff should be number-one concerns,” Cullen added.

It isn’t just money that the indie bookstore community stands to lose. At Books Are Magic in Brooklyn, a typical author event might yield a modest 25 book sales, said novelist Emma Straub, who co-owns the Cobble Hill shop with her husband. But the connections made through those events can be invaluable — particularly for first-time authors.

Those relationships can “change the course of a writer’s life,” Straub said. “Independent booksellers, when they love you — they love you. And they will sell your book to anyone who walks in the door.”

Kirkpatrick has tapped into her own network in hopes of offsetting looming profit losses. After calling on authors to lead virtual writing classes, she got responses from acclaimed novelists Meg Wolitzer and Lily King. She plans to launch the classes on the store’s website.

Historian Alexis Coe — whose biography of George Washington is on next month’s docket for the store’s nonfiction book club — also stepped up to support the shop by writing a personal thank-you note to anyone who buys her bestseller at Old Town Books.

The store’s customers have also rallied around Kirkpatrick, yielding a noticeable uptick in online orders. So it was no coincidence that she and Scout found themselves delivering a stack of books to several store regulars last Sunday.

Among the books they delivered was “Uncommon Type,” a short-story collection written by the first American celebrity to publicly reveal he had tested positive for the novel coronavirus: Tom Hanks. That, the customer assured Kirkpatrick, was just a coincidence.