A demonstrator holds up a placard during a protest Friday in Portland, Ore., against the election of Donald Trump as president. (Ankur Dholakia/AFP via Getty Images)

Oregon’s largest city is often depicted as a progressive haven: a bastion of hippies and hipsters, feminists and vegans, bike commuters, urban farmers, backyard-chicken owners and coffee snobs. Decades after Portland’s peace protests earned it the nickname “Little Beirut,” its deep blue reputation has been cemented far beyond the Northwest via the exaggerated — and sometimes spot-on — stereotypes of the sketch comedy show “Portlandia.”

But in recent days, as protests erupted in several U.S. cities following Donald Trump’s presidential election victory, Portland’s mostly peaceful demonstrations were tainted by uncharacteristic violence. On Thursday, a march turned into a seething riot as baseball-bat-wielding anarchists took aim at plate-glass windows, windshields and electrical power boxes. Early Saturday, one protester was shot in the leg. Overnight Saturday, protesters filled downtown streets despite discouragement from city officials and demonstration organizers, and 71 people were arrested, most on charges of disorderly conduct. They were mostly male, with an average age of 25.

Visibly frustrated at a news conference on Saturday afternoon, Mayor Charlie Hales said he had a message about Portland for the rest of the world: “We’re a proud liberal city,” he said. “I use that word with all affection despite the fact that it causes other people’s blood to boil.” Violence here, he said, is “not the norm.”

On Sunday afternoon, hundreds of people gathered in the rain for what had been billed as a peaceful, family-friendly march to downtown’s Pioneer Courthouse Square. They carried balloons and shouted “Stronger! Together!”

One participant, 38-year-old Ella Gray, said she and her husband moved to Portland from New York a month ago “to be safer.” When protesters smashed windows and lit fires in their new neighborhood on Thursday, Gray said, she was “shocked it happened in, of all places, Portland.”

Police in Portland, Ore., said that protests against President-elect Donald Trump had turned into "a riot," on Nov. 10, with some smashing windows and lighting fires in the streets. (Jenny Starrs/The Washington Post)

But Portland’s kumbaya image isn’t wholly reflective of its past — or its complicated present. Tension is high over soaring rents and gentrification that are forcing out creative types and low-income residents. And the roots of racial inequality and white supremacy simmer under the clean exterior of a growing city where just 6 percent of the population is black, according to the U.S. Census Bureau.

When Oregon was admitted into the Union in 1859, it was founded as a white utopia, the only state with black exclusion laws written into its Constitution — language that voters didn’t take action to remove until 2000. The Ku Klux Klan found a stronghold in Oregon well through the 1920s, and a code of ethics for local real estate agents prohibited housing sales to nonwhites. Housing discrimination was finally outlawed in 1957.

The contentious presidential race and the election of Trump, whose campaign has energized white supremacists, seems to have provided an opportunity for Oregon’s racial tensions to surface. A local high school was roiled last week after a commenter on the 2017 class’s Facebook page suggested that students create a “Ku Klux Klub.” On Election Day, dozens of students at a high school in a town north of Salem gathered with pro-Trump signs, displayed a Confederate flag and shouted comments including “Pack your bags, you’re leaving tomorrow” to Hispanic students, the Salem Statesman Journal reported.

“Oregon is very rural and racist, even though we perpetuate progressiveness,” Teressa Raiford, a Black Lives Matter protester and organizer of Don’t Shoot Portland, said Thursday night.

Raiford said she saw the chaotic turn to the protest as a symbol of it being co-opted by people she says weren’t there for the right reasons.

“To me it’s just a very unfair advantage,” she said. “It’s another way of promoting their own privilege.”

One self-identified anarchist, 20-year-old Armeanio Lewis — not his real name, he says — defended the Thursday violence. “It’s not against marginalized communities,” he said Friday. “It’s a declaration that they’re safe. We’ll protect them.” He described the unrest “an unleashment of rage” at what he calls violence advocated by Trump.

The chairman of the Oregon Republican Party, Bill Currier, called Sunday for Hales to resign and for Gov. Kate Brown (D) to deploy the Oregon National Guard to the city, according to the Portland Tribune. “He has lost control,” Currier said of Hales. “The governor needs to step in to restore order.”

After Thursday’s violence, protest organizers struck a tone more familiar to Portland activism. Portland’s Resistance, a loose group that led the initial demonstrations, held a “heal-in” Friday on the steps of City Hall. One organizer read a long list of demands the group wants fulfilled: Rent control, an end to police brutality, clean air and water, inclusion for lesbian, gay, bisexual and transgender people, and stopping Nestle from opening a bottled water operation in the Columbia Gorge, among other things. He said all are necessary to position Portland as a progressive beacon under a Trump presidency.

Emcee Adriane Ackerman directed the crowd to “talk about our frustrations, our fears, our assets,” and to refocus on what she called the potential harm of Trump’s presidency. For an hour, the crowd of hundreds divided up by neighborhood and engaged in small group discussions. A man stood up in one group: “The reason I’m here is I’m scared, I’m queer and I’m not happy about what . . . is going on right now.”

But despite organizers’ focus on the future, some in the crowd arrived with teeth gnashing and ready to march — almost as if the previous night’s violence had inspired them to lash out at the city’s problems. A group of young people with black scarves over their faces carried full-length mirrors. “That’s for when the riot police come,” one said. “We’ll show them their faces.”

As Ackerman began to direct the crowd to come back together, cheers of “Let us march” drowned her out, and the crowd divided. By 8 p.m., the heal-in had transformed into a full-blown anti-Trump protest, with the crowds cheering “No Trump! No KKK! No fascist U-S-A!”

But on Saturday, Jeff Surgeon, of Beaverton, Ore., watched that night’s protest unfold wearing a jacket unzipped with a white Trump Pence shirt underneath. He smiled at the protesters. “It’s kind of crazy that people are so against Trump,” he said.

“I don’t think he’s going to build an actual wall,” Surgeon added. “He just wants secure borders.” He points to other countries: “Look at Korea, they have strict borders.”

Surgeon said no protester had harassed him because of his shirt. “Everybody’s entitled to their free speech.”

In a Sunday afternoon march, families gathered with balloons and signs that boasted more positive messages: “Kids Have a Voice Too!” and “This Mama Will Miss Obama.” The crowd chanted, “Stronger! Together!”

If the afternoon march captured the do-gooder spirit of “Portlandia,” the mood of the previous day’s protests was starting to boil, for a sixth night. Portland’s Resistance held a candlelight vigil in Tom McCall Waterfront Park, where people gathered again to hear Gregory McKelvey, Lewis and others speak. Organizers were clear: They would not distance themselves from the behavior of anarchists — those who they say had been blamed by Portland police and media for damage to the city. On Sunday afternoon, 10 windows remained broken in the Pearl District: at Chase Bank, Bank of America and a restaurant.

McKelvey, for a third time this week, quoted the Rev. Martin Luther King Jr.: “A riot is the language of the unheard.”

“I don’t think it’s fair to blame any group for the actions of individuals,” McKelvey told the crowd. “I’m sick of singing ‘We Shall Overcome.’ Donald Trump is going to be president, and we need to overcome.”

Nearby, as attendees gathered in the park, police were stationed under the Morrison Bridge.

Karin Brulliard in Washington contributed to this report.