When a group of self-avowed white nationalists interrupted an author chat Saturday at bookstore Politics and Prose with a megaphone and chants of “This land is our land,” workers were surprised — but not unprepared.

The Northwest Washington bookstore began training employees earlier this year to respond to flash protests, co-owner Bradley Graham said. The decision came after previous author events, including a talk last month by former homeland security secretary Janet Napolitano, drew the ire and attention of left-wing activists and agitators.

Politics and Prose isn’t alone.

Bookstores, libraries and book fairs have become frequent targets of white nationalist groups, who in recent years have interrupted author talks, children’s reading hours and, in one instance, threatened to burn down a bookstore in Berkeley, Calif.

“One of the issues is we can’t always anticipate what author or event might draw protesters or a demonstration,” Graham said. “Clearly, when the political climate heats up, there would seem to be more kindling that could be lit. But whether this will translate to more disturbances at author talks, I certainly hope not, but who knows.”

Patrick Casey, co-founder of the white-nationalist group American Identity Movement, strode into the bookstore Saturday holding a megaphone branded with the organization’s insignia and led a chant of “AIM” on his way out the door.

The group, which formed last month and is headquartered in the Washington area, is considered by several organizations that track hate groups to be a rebranded version of Identity Evropa, an organization that has sought to recruit college students and young conservatives to join its ranks through posters and online propaganda, according to the Anti-Defamation League.

Leaders of the American Identity Movement have denied that the two groups are affiliated. But on Saturday, Casey was flanked by nine supporters, several of whom appear to be members of Identity Evropa from states such as Georgia, Illinois and Pennsylvania, according to groups that track and identify white nationalists online.

Graham said he hadn’t expected the talk by author Jonathan M. Metzl — who was discussing his book, “Dying of Whiteness: How the Politics of Racial Resentment Is Killing America’s Heartland” — would attract much attention.

“We have to accept that a lot of this may just be unpredictable,” Graham said.

Metzl’s book explores how some lower- and middle-class white Americans are drawn to politicians who promise to improve their quality of life while also promoting policies that place white Americans at greater risk of illness and death.

“You would have the white working class trade their homeland for handouts,” Casey said into the megaphone as the crowd jeered and booed.

In a statement published Sunday on the American Identity Movement website, Casey wrote that “Mr. Metzl’s book fails to discuss the real reasons why leftism has been killing America’s heartland,” which he described as “globalism,” “mass immigration” and “cultural decay” that have shifted the country’s “demographics.” Noting that videos of their interruption have been viewed online more than a million times, Casey said targeting gathering spaces like bookstores and libraries is part of a broader strategy.

“Disruptions like this are a great way for us to insert our ideas into the discussion on race and identity,” he said in an interview. “We knew it would be a provocative and bold thing to do, to go into what we felt like is the other side’s territory and get people talking about us.”

When protesters arrived Saturday, Metzl said he was talking about a man in the bookstore audience who helped his father and grandparents escape the Nazis.

“I was saying how much stronger America is when we think about our responsibility to people in need. At that point, the Nazis walked into the talk,” he told The Post. “It was very symbolic for me.”

Graham said he has received messages and offers of support from bookstores around the country, some of which have dealt with similar actions from white-nationalist groups.

Revolution Books in Berkeley, Calif., a regular target of far-right activists, tweeted a statement in support of Politics and Prose.

“We call on every person whose work, morality, and values aspire to a world of diversity, of overcoming the oppression of all peoples regardless of nationality, race, gender, or beliefs to stand with Politics and Prose and with authors and voices exposing this dangerous moment,” the statement said.

About a year ago, Revolution Books endured several run-ins with far-right demonstrators, according to local media reports, including a group from Sacramento that stormed the store and insulted people inside.

“We’re going to burn down your bookstore. You know that, right?” demonstrator Rob Cantrall said in a video taken by bookstore staff.

In November, several demonstrators wearing Make America Great Again hats tried to protest a talk in the District by Portland State University lecturer Alexander Reid Ross, who wrote a book called “Against the Fascist Creep.”

Last week, several members of the American Identity Movement targeted a library in New Orleans, where several drag queen performers for years have led monthly story hours for kids. The protesters dressed up as clowns and disrupted the event before being told to leave.

Revolution Books and the Alvar Library in New Orleans didn’t respond to a request for comment Monday.

Politics and Prose, whose Chevy Chase location is down the street from Comet Ping Pong, received threats in 2016 during the height of the Pizzagate conspiracy, which culminated in a gunman searching the pizza place for evidence of a child sex ring that didn’t exist.

Graham said despite the uptick in protests in and around the District, demonstrations at his stores remain infrequent. He reiterated Monday that no one was hurt and that the disruption lasted “just a few minutes” before the demonstrators left of their own accord.

But, he added, he and his colleagues have begun to think about the store’s security and response to protests with a renewed sense of urgency.

“We certainly want to keep people safe, but, look, this is a bookstore,” he said. “We are not going to become an establishment where people feel like they’re walking into a prisonlike environment to go hear an author speak. That goes against our very grain, which is to exist as a place for people to gather and ultimately support free speech.”