With just a few thousand votes between the two candidates for governor, election night during the US midterms in Wisconsin could not have been more tense. The slender lead kept flipping between Republican and Democrat as various precincts reported their results. Then shortly before midnight a local news presenter suggested, almost as an aside, that there could be about 40,000 more votes yet to be counted from the Democratic stronghold of Milwaukee. A week earlier, at a Republican event in nearby rural Kenosha, Milwaukee had been a punchline – an emblem of crime-ridden, multiracial, urban dysfunction. But they weren’t laughing now.

When the numbers were crunched, the Republicans were done. After eight years of austerity, occupations, demonstrations and a failed attempt to recall conservative governor Scott Walker, who was twice re-elected, Democrats took back the governor’s mansion.

In its margins the victory was narrow; in its character it was immense. Out went the Koch-friendly, union bashing, Trump-embracing Republicans. In came a Democratic team with an entirely different trajectory.

The governor-elect, Tony Evers, is a former teacher and school superintendent; Mandela Barnes, a 31-year-old African American community organizer, will be his lieutenant governor; Josh Kaul, a former prosecutor and voting rights activists, was elected attorney general; and Sarah Godlewski, a veteran campaigner for fiscal accountability, will be the state treasurer.

“These are not the traditional Capitol aides,” Nation magazine columnist and Wisconsin native John Nichols told me. “Gradually, they put together a new kind of politics.”

There is an intimate connection between those years of protest and the nature of this election victory that has national significance in the US. It provides a lesson about the connection between movements and parties, elections and politics, that the Democrats would do well to learn before the new Congress sits in January.

Some of the biggest demonstrations in US history have taken place in the past two years: the two largest were women’s marches while the third was a youth-inspired protest for gun control. Earlier this month, young people turned out to vote at a rate not seen in a quarter of a century. The election saw a record number of women, minorities and minority women sent to Congress.

This was not a coincidence. Nor is it a story that ends with the election of these candidates. What follows is a new chapter in which we will see whether those who were elected are willing and able to deliver.

The challenge is not a new one. There are many within the liberal establishment who struggle to understand politics beyond elections. If a political action is not geared, at least in part, to voting a certain way then they see limited, if any, value in it.

“Simply being in a public place and voicing your opinion in and of itself doesn’t do anything politically,” said Congressman Barney Frank regarding the then-burgeoning Occupy Wall Street movement. That would be news to the suffragettes and movements for civil rights and trade unions, among others.

When President John F Kennedy tried to persuade civil rights leaders to call off the March on Washington in 1963, where Martin Luther King made his “I have a dream” speech, he said it could damage important legislation he hoped to pass. “We want success in Congress,” he told them. “Not just a big show at the Capitol.”

The African-American trade union leader A Philip Randolph warned him: “The Negroes are already in the streets. It is very likely impossible to get them off.” The march, and protests across the country, played a far bigger role in shaping the racial politics and civil rights legislation of the next few years than Kennedy’s bill ever could.

The connection between those in the streets and those at the ballot box is not always immediate and causal. Often it is a question of framing, inspiration and articulation – movements create space for conversations that elected officials are often too wary to have. They address issues too urgent for a timetable geared not around the needs of people but the re-election of candidates. Disparaging as Frank was about Occupy Wall Street, the Barack Obama White House believed it had a significant effect on his re-election prospects.

“I think it had a significant change in the overall climate in that it reframed the discussion nationally and it did two things,” Anita Dunn, White House communications director early in Obama’s presidency, told Dan Balz in his book Collision 2012. “One, it gave people permission to openly discuss something that had not really been openly discussed which was the growing inequalities and the unfairness. Two, it gave many members of the Democratic party much more confidence in going to those places in the criticism of the Republican policies.”

Not only that, but “Democrats respond when they’re pushed,” as Jesse Sharkey, now the leader of the Chicago Teachers Union, told me after Barack Obama’s re-election in 2012. “They’re much more a weather vane than Republicans. If the wind’s blowing hard enough they’ll move.”

There has been a gale afoot for some time now. The election of the most racially diverse and most female Congress ever is clearly a product of a moment in which #MeToo, #BlackLivesMatter, Women’s Marches, Fight for 15, immigrant rights, gun control and climate change have emerged or continued to surge. The election of a misogynist bigot to the White House has doubtless been a catalyst for women and minorities to stand for election too.

The Democratic party is an undeserving recipient of the energy and frustration generated over the past two years. It remains to be seen if it has the capacity and desire to become an adequate vessel for it. The fact remains that, electorally, it is also the only meaningful vessel available.

Thanks to movement politics, those in power look different and come from more radical traditions. The question now – indeed the perennial question when it comes to issues of representation and diversity – is will they act differently and honor the traditions that made their election possible?

Gary Younge

Sara Stathas

Help deliver the independent journalism that the world needs, make a contribution of support to The Guardian.