WASHINGTON — In the Virginia suburb of McLean, where the local diner is a C.I.A. breakfast hangout, Gen. Michael V. Hayden, who ran the agency for George W. Bush, is playing career counselor these days. With President-elect Donald J. Trump attacking the intelligence community, the general says his “old tribe’’ is feeling “a special angst.”

In free-spirited Takoma Park, Md., a “nuclear-free zone” since 1983, a left-wing resistance movement is taking shape. Nadine Bloch, an activist and artist, is running pre-inaugural training on nonviolent protest — complete with mock police officers wielding rolled up newspapers as batons.

And here in the District of Columbia, where 91 percent of voters cast their ballots for Hillary Clinton, “full-scale panic” is setting in, said John Feehery, a Republican strategist and Trump enthusiast. Leslie Harris, a liberal Democratic lawyer, uses war imagery: “I feel like my city is about to be invaded.”

Washington has always been a chameleon of a city, accustomed to remaking itself when the White House changes hands. But as Mr. Trump’s inaugural draws near, in a nation so deeply divided that it seems the political middle has entirely disappeared, perhaps no place in America feels as unsteady and on edge as the capital, which Mr. Trump calls “the swamp.”