Theo’s Pizza Restaurant is heaving, the anger and frustration palpable. James Egloff drove his family five hours on a frostbitten day to be here. Preacher’s son Ted Cruz, in blue jacket and open-collared shirt, does not disappoint, eviscerating the political establishment, talking guns and religion and prophesying a national “awakening”. The audience, clapping and hollering, loves his firebrand act.

At the Henry J Sweeney Post of the American Legion, meanwhile, things are not so hot. Jeb Bush, in shirt, tie and suit trousers, works the wood-panelled room with Senator Lindsey Graham in tow. The candidate is unfailingly polite and a little stiff, with agitation brewing beneath the surface. He promises better healthcare for military veterans and a pragmatic strategy for fighting Islamist terrorism.

Chris Christie urged to 'smack' Trump amid mainstream Republican panic Read more

The retail politics of the New Hampshire primary, in which contenders for the most powerful office in the world must brave chill winds to shake hands and pose for selfies in unromantic beer halls and school canteens, are impressive in the digital media age. But the contrasting energy in Manchester last week illustrated how the 2016 presidential election has confounded all expectations. A year ago Jeb Bush versus Hillary Clinton looked like a safe, if dull bet. No one dreamed that, with the Iowa caucuses approaching on 1 February, polls might be suggesting the rather less likely head-to-head of Donald Trump versus Bernie Sanders, a clash not of political dynasties but of popular movements.

Trump, 69, a billionaire celebrity from New York who has never held political office, has dominated the national Republican race although hardline conservative Cruz, 45, another outsider, appears to have the edge in Iowa. Neither has the endorsement of a single sitting governor or senator. Sanders, a 74-year-old socialist senator from Vermont, appears well placed to beat Clinton among Democrats in both Iowa and New Hampshire. While she remains the long-term favourite, the former first lady could be forgiven for suffering stomach-knotting flashbacks to her defeat by Barack Obama in 2008.

The 162-year-old Republican party of Lincoln and Reagan, and the 188-year-old Democratic party of Roosevelt and Kennedy, are facing simultaneous revolts from their own rank and file that threaten to reshape the American political landscape. Both find themselves assailed by a popular uprising against Washington: Democrats disappointed that their president hasn’t achieved more in seven years, Republicans riled that their control of both houses of Congress has yielded little – and independents despairing of unprecedented deadlock on Capitol Hill.

Sanders told the MSNBC channel last week: “What we are doing in this campaign, it just blows my mind every day because I see it clearly, we’re taking on not only Wall Street and the economic establishment, we’re taking on the political establishment.”

Facebook Twitter Pinterest Republican Presidential candidate Senator Ted Cruz experiences retail politics in New Hampshire. Photograph: Rick Friedman/rickfriedman.com/Corbis

And Cruz bellowed at the pizza joint: “If you think Washington is fundamentally broken, that there is a bipartisan corruption of career politicians in both parties that get in bed with the lobbyists and special interests and grow and grow and grow Washington, and we need to take power out of Washington and back to ‘We the people’, that is what this campaign is all about!”

The crowd in Manchester, New Hampshire, erupted in whoops and applause. Egloff, who had brought his wife and three children from New Jersey, has donated to a candidate for the first time in his life, giving $1,500 to the Cruz campaign. “I can’t tell the difference between Democrats and Republicans any more,” he said. “There is zero change with either. Republicans are every bit as complicit as liberals. To see Cruz coming along to blow everything up is so exciting. We are sick of the entrenched establishment.”

There is also a deeper dissatisfaction with the status quo. As a small software business owner, Egloff, 45, complains about high taxes and belongs to a generation that, while hardly destitute, feels constantly stressed and hard done by compared with its predecessors. “I’m being told things are better than they are. I survive and I eat but I’m not getting ahead. It’s not what my father experienced.”

The white man pathology: inside the fandom of Sanders and Trump Read more

The United States remains the world’s sole superpower and biggest economy. Politicians constantly tell voters they are living in the greatest nation the earth has ever seen and stress the exceptionalism of the American dream. But this may only help to inflate expectations and sow discontent.

Dan Cabanel, 56, a financial sales representative from Concord, New Hampshire, blames Obama’s health reforms for wiping out some of his insurance business. “If Obama had been a really good president, we wouldn’t have this uncertainty,” he said. “He was supposed to be uniter, bringing the country together, but he has been the most polarising leader.”

Such frustrations found expression in social movements such as Occupy Wall Street on the left and the Tea Party on the right in recent years. Now they are lapping at politicians’ feet. Americans’ approval of Congress averaged just 16% in 2015, according to pollster Gallup.

Rich Galen, a Republican strategist and former press secretary to Vice-President Dan Quayle, said: “I do believe there is a confluence of anger at the pillars of American society. Look at what people have confidence in: Congress is down below used car dealers and reporters. We’re in an era when nobody likes anything and the two people most vocal about not liking things are Trump and Sanders. From two different directions, they’ve attracted people who like the way they see the world.”

They divide along a line seldom acknowledged in US discourse: class. Sanders draws strong support from graduates and students, whereas most of Trump’s followers are on low incomes and did not go to university. One hammers Wall Street, the other demonises immigrants, but both are perceived as authentic and unspun, right down to their oddball hair. They are two sides of the same coin.

Facebook Twitter Pinterest ‘Sanders’s campaign looks a lot more like Obama’s in 2008 than Clinton’s does,’ said Angus Johnston, a historian of student activism. Photograph: Mary Schwalm/Reuters

Neil Levesque, executive director of the New Hampshire Institute of Politics at Saint Anselm College, said: “I talk to many people whose first choice is Trump and second choice is Sanders, even though they’re diametrically opposed. People feel Trump is saying what they think, and if you asked supporters of Sanders, one word they would use is ‘authenticity’. A lot of this is the Tea Party and Occupy Wall Street. Those were the seeds and now the grass is growing.”

The ground is fertile because of circumstantial weakness at the top of both parties. Bush, 62, and 68-year-old Clinton are arguably less impressive campaigners than the former presidents who share their surnames. At a recent Democratic debate, Clinton presented herself as a continuity candidate barely distinguishable from Obama – hardly a cri de cœur at the best of times. Bush, meanwhile, faces the additional complication of an overcrowded field, with the likes of Chris Christie, John Kasich and Marco Rubio threatening to split the “establishment” vote.

Angus Johnston, a historian of student activism based at City University of New York, said: “Clinton has been wrapping herself in the Obama presidency and presenting herself as the successor but, in a lot of ways, Sanders’s campaign looks a lot more like Obama’s in 2008 than Clinton’s does. I’m seeing in young people’s debates it’s ‘pragmatic and practical’ versus ‘let’s shoot for the stars’ because the Obama administration has not been the transformational force they hoped it would be. Sanders is clearly responding to the energy coming off recent campus protests and channeling it in his own way.”

As for Trump, Johnston continued, “We see a reaction against the cultural trends of the last few years. He attacks political correctness and the ideology of the left, calling for a ban on Muslims and wall to keep out Mexicans. A lot of this is framed as a willingness to tell the truth. There’s anti-Washington stuff and also more general cultural attacks on intellectuals.”

Like Jeremy Corbyn of the British Labour party, neither man is quite as unelectable as they first appeared to the pundits. Johnston said: “The further we go into this campaign, the clearer it becomes that Sanders is not really a socialist. He’s a liberal Democrat and, win or lose, he’s in the mainstream of the left wing of the Democratic party.” Trump is “a very gifted speaker” from New York’s Queens, home to various ethnic groups including a large black middle class. “He’s not just coming from a position of rural whiteness.”

Facebook Twitter Pinterest Sarah Palin endorses Donald Trump: ‘Our own GOP machine … they’re attacking their frontrunner.’ Photograph: Mark Kauzlarich/Reuters

Twelve major Republican candidates and three significant Democrats are shuttling Iowa and New Hampshire with growing intensity as the day of reckoning nears, knocking on doors and making speeches in modest, no-frills towns in all weathers. Voter Brian Pickowicz, 22, from Franklin, New Hampshire, said: “For the last 12 years Americans have seen the establishment at work, whether Obama or Bush. They are done with the status quo. The talking points are not working like they used to.

“Donald Trump is running one of the best campaigns ever seen. He is doing a great job of using fear and hate speech so people will vote for him. It’s kind of scary.”

But the establishment elders are not taking the parallel rebellions lying down. Clinton, who has husband Bill on her side and remains popular among African Americans and Hispanics, has unleashed a series of attacks on Sanders in the past week. Bush has denounced Trump as “a jerk” and on Friday the National Review magazine published essays by 22 prominent conservative thinkers in opposition to the tycoon’s candidacy. Former governor Sarah Palin, whose stream-of-consciousness endorsement of Trump last week entertained more than it informed, nevertheless hit the mark when she warned: “Our own GOP [Grand Old Party] machine, the establishment, they who would assemble the political landscape? They’re attacking their own frontrunner!”

Facebook Twitter Pinterest A supporter waits to hear Bernie Sanders at a campaign stop in Peterborough, New Hampshire. Photograph: Cj Gunther/EPA

Some predict the Republican party could split in two if Trump prevails. But Lindsey Graham, the South Carolina senator whose own campaign for the presidency crashed and burned, refuses to panic, insisting the widespread frustration will not last. “In the Bernie world, big banks are out to get you and the rich guy’s screwing you over,” he said. “In Trump’s world, the illegal immigrants are going to sell your kids drugs and rape your wife, and foreigners are going to take your jobs.

“This has happened before when people had economic anxiety but it never pans out. We always reject this. It will level out. Polling is just ether right now. When people go into the voting booth and they’re quiet, nobody there but them, New Hampshire particularly and South Carolina are going to take seriously the job of picking the next president. That’s why I think Jeb is very viable.”

Graham added: “This is a fad that will pass. The anger is real but the solutions make no sense. We can’t have 90% tax rates and, on the Republican side, we can’t insult everybody in the world and become president of the United States.”