It was a perfect match. The protesters, whose ragged encampments across the United States in 2011 sought to call attention to growing income inequality, finally had a presidential candidate who vowed to tax Wall Street and take on the "billionaire class." Sanders even embraced their movement's catchphrase, haranguing the nation's wealthy elite as "the 1%" in nearly every speech.
The activists quickly went to work for Sanders in early primary states and online, where one Occupy organizer coined the #FeelTheBern hashtag that became the campaign's de facto slogan.
In Iowa this week, former Occupy protesters could be found easily among Sanders' volunteers, knocking on doors and dialing voters to drive Sanders supporters to Monday's caucus.
But their most significant contribution to the Vermont senator's rapid rise may have been their protest's message.
"Economic inequality didn't become a mass issue until Occupy," said Michael Kazin, a Georgetown University history professor and co-editor of the leftist magazine Dissent. "It was the catalyst for publicizing these ideas and getting Americans to talk about them in ways they hadn't before."
In other words, Sanders might not be where he is today, trailing Hillary Clinton by just a few percentage points in the polls, if Occupy hadn't helped focus attention five years ago on the ideas that are now at the core of his campaign.
"Occupy helped elevate the narrative that we have a rigged political system and a rigged economy," said Hugh Espey, a community organizer in Des Moines who was arrested with dozens of Occupy protesters when they refused to leave the grounds of the Iowa statehouse.
He sees Sanders, a longtime independent who was agitating for greater economic equality long before many Occupy protesters were born, as the latest incarnation in a string of progressive presidential candidates from inside and outside the Democratic Party that includes Dennis Kucinich and Ralph Nader. But those candidates never generated as much support as Sanders, who has repeatedly drawn more than 10,000 people to his rallies.
His popularity is partly "the inheritance" of Occupy and the political awakening that occurred after the 2008 economic collapse, said Espey, the director of Iowa Citizens for Community Improvement, a group whose political action fund has been operating phone banks and other get-out-the-vote activities for Sanders.
Occupy came on the scene in the fall of 2011 when hundreds of activists partly inspired by the "Arab Spring" uprisings erected tents in Zuccotti Park in New York's financial district. The protest was pointedly leaderless and took aim at an array of targets, including what activists described as the corrupting influence of money in politics and the role major banks played in the financial crisis. Protesters called themselves "the 99%," in contrast to the 1% of Americans who control most of the country's wealth.
Similar demonstrations popped up around the country. Most of them ended on their own or were evicted from protest sites by police by the end of the year.
Not everyone who is supporting Sanders was involved with Occupy. But a large number of people who were involved with Occupy are supporting Sanders.
In 2011, filmmaker Bob Swope drove to the Occupy protest in Columbia, Mo., and asked how he could help.
Last week, Swope drove four hours to Des Moines to volunteer for Sanders.
He spent the weekend canvassing neighborhoods with another volunteer, a 21-year-old from France. As they walked down an oak-lined street, keeping their eyes to the ground to avoid patches of black ice, Swope said he appreciated the energy of the Occupy movement but became frustrated with its horizontal organizational structure.
"It was kind of a movement without a leader," Swope said. The Sanders campaign, with its clear and passionate leader, has more staying power, he believes.
Other former Occupy protesters stumping for Sanders in Iowa this week include Winnie Wong and Stan Williams, whose group, the People for Bernie, has developed a number of online memes and hashtags in support of the senator, including #FeelTheBern.
The protest movement and the Sanders campaign share more than just criticism of corporate money in politics, Wong said. Sanders' pledge to provide tuition-free higher education and do more to combat climate change echoes the demands of protesters five years ago.
Wong sees the Sanders campaign as one way to continue the work the Occupy movement started.
"It's been about making sure that we hang on to the narrative and the dialogue that people were talking about when Occupy was alive and thriving," she said.
For Aaron Jorgensen-Briggs, a Sanders win would be the protest movement's greatest victory.
"We went from this moment in Occupy where we were just beginning to shed a light on these issues in a profound way on the national stage to the moment we're in now, where we actually have a candidate for the highest public office in the country who has a platform that is addressing all of the issues that Occupy raised," said Jorgensen-Briggs, who was involved with the Des Moines Occupy movement.
Lately, he said, he's had to pinch himself.
"A candidate who talks about socialism could actually become president," he said. "It's absolutely unprecedented."