In a year when public faith in the institutions of American democracy is being tested, a roiling presidential election contest risks demeaning already dimly-viewed centers of power and challenging the meaning of patriotism.

The contest has called into question the legitimacy of the political parties, government in general, the presidency in particular and the media to boot.

Kellyanne Conway, a longtime Republican pollster advising Donald Trump’s presidential campaign, suggests that any blame for undermining perceptions of public institutions this year cannot be left at any one person’s “door step.”

Hillary Clinton’s evolving explanations of what she knew about classified information on her private email server and when she knew it surely has contributed to distrust measured in the public’s view of the Democratic nominee. And Bernie Sanders planted doubts about a “rigged’’ system of super-delegates that ensured Clinton’s nomination, a bias only underscored by the leaked, hacked emails of party officials conspiring to scuttle Sanders’ campaign.

Yet, while Trump too has questioned the integrity of his own party’s primaries, he has raised doubts about the larger electoral system with his repeated contention that November’s vote could be “rigged” — the candidate starting over the weekend to enlist a national posse of volunteer poll-watchers. And in publicly tangling with the parents of a Muslim American soldier killed in Iraq, critics within his own party contend Trump has blurred the boundaries of patriotic behavior in public life.

Trump has even questioned the intentions of a sitting president confronting terrorism — “we’re led by a man that either is not tough, not smart, or he’s got something else in mind,” Trump said after the mass shooting in Orlando. And most recently, he has labeled “Barack Hussein Obama… the founder of ISIS.”

The image of American institutions wasn’t great at the start of this contest. Just 19 percent of Americans surveyed by the Pew Research Center last fall said they trust the federal government to do what’s right always or most of the time. Fewer than three in 10 have voiced such faith since 2007, Pew reports — “the longest period of low trust in government seen in more than 50 years.”

Congress isn’t the only villain. Nearly two-thirds of those surveyed say the national news media have a “negative influence on how things are going in the country.”

Some of the rhetoric of the 2016 campaign is “speaking to a sector of the electorate that’s already dissatisfied,” says Jocelyn Kiley, associate director of research at Pew. “We have been at a low level of trust in government for some time, and Congress has been at a 30 percent favorability rating for years.”

Yet Pew’s polling has found more frustration than anger in the public’s attitude toward government — except among one faction in particular: Trump supporters.

“When it comes to anger and frustration, most Americans are frustrated with government, but we’re not seeing a lot of evidence that they’re angry,” Kiley says. “When we looked at it this spring, Republicans seemed to be more angry… And it was Trump supporters who were more likely to be angry.”

Frustration runs at 57 percent, anger 22 — Republicans: 32 percent angry.

So Trump struck an effective note for his audience when he said at a signature, free-style rally in Erie, Pennsylvania, last week: “You cannot do well when you have a government that is so incompetent, so stupid, you can’t do well… We have an incompetent president, we have people who don’t know what they’re doing…. We’re running a third-world country, folks.”

In an interview with The Miami Herald, Trump warned that the U.S. could “end up being a large version of Venezuela.’’

Speaking of Clinton and the media, he said in Erie: “Our government is for sale by a crooked person, and what they’re doing is they’re trying not to talk about her… Someone explained to me, if they don’t report on her, people aren’t going to know how bad she is.”

This was also a week in which Trump repeatedly stated that Obama is “the founder of ISIS” and Clinton the “co-founder” and “most valuable player’’ of a league bent on terrorizing western society. Jake Sullivan, senior adviser to Clinton, denounced Trump for “echoing the talking points” of the enemy, and “trash-talking the United States.” For his part, Trump later insisted he was being “sarcastic.”

This offered yet another opening for attacking the media: “These people are the lowest form of life, they are the lowest form of humanity,’’ Trump said in Erie, mocking the media for not understanding that “I was being sarcastic.”

In Pennsylvania, where Trump trails Clinton by an average of 9 percentage points in recent polls, he said “the only way we can lose, in my opinion — I really mean this, Pennsylvania — is if cheating goes on.” In Altoona, he called on supporters to monitor polling places: “Make sure other people don’t come in and vote five times,” he said. “If you do that, we’re not going to lose.” In Ohio, trailing Clinton by fewer points, Trump said: “I’m afraid the election’s going to be rigged.”

At his campaign website, recruiting “Trump Election Observers,’’ the candidate now explains: “Help Me Stop Crooked Hillary From Rigging This Election!”

Trump has slumped in battleground polls since the parties’ conventions in states where the Electoral Vote will be settled. The frequent tweeter complained over the weekend: “If the disgusting and corrupt media covered me honestly and didn’t put false meaning into the words I say, I would be beating Hillary by 20%”

At a time when so much of the debate is waged on social media, Steven Strauss, a visiting professor at Princeton, cites Mark Twain in his own tweet: “Patriot: the person who can holler the loudest without knowing what he is hollering about.”

Pew’s Kiley suggests one cannot tell from polling yet whether any chorus of complaints about government and the electoral process in general will exacerbate the anger registered among a faction of voters, particularly Trump-backers.

Yet the prospect of the loser of a presidential election refusing to concede defeat points to deepening unrest among an already polarized electorate. When Al Gore won a majority of the popular vote in 2000 and lost in the Electoral College after a 36-day court battle over Florida’s disputed ballots, he quickly conceded.

Pat Buchanan, a former adviser to Republican presidents who twice sought the party’s nomination, ran as the Reform Party nominee in 2000. Confusing “butterfly ballots” in Palm Beach County leading thousands of ostensibly elderly Democratic voters to punch Buchanan’s name were only part of the controversy surrounding an election which Gore lost by 537 votes in Florida.

Now Buchanan warns of unrest anew. In an essay posted at WND.com, a Christian news website, he writes: “Yes, the system is rigged.”

“This longest of election cycles has rightly been called the Year of the Outsider,” Buchanan writes. A “74-year-old socialist set primaries ablaze with mammoth crowds that dwarfed those of Hillary Clinton,” he writes, and “a non-politician, Donald Trump, swept Republican primaries in an historic turnout.”

“But if it ends with a Clintonite restoration and a ratification of the same old Beltway policies, would that not suggest there is something fraudulent about American democracy, something rotten in the state?” Buchanan asks. Quoting John F. Kennedy, this onetime White House speechwriter notes: “Those who make peaceful revolution impossible will make violent revolution inevitable.”

Kennedy said this during a March 1962 address on the first anniversary of his Alliance for Progress, a multibillion-dollar aid program for Latin America.

These words preceded Kennedy’s comment: “Those who possess wealth and power in poor nations must accept their own responsibilities. They must lead the fight for those basic reforms which alone can preserve the fabric of their societies.”