Before she unseated a 10-term congressman from the Bronx, before she became the youngest woman ever elected to the House and long before she was the media obsession known simply as AOC, only one camera was trained on Alexandria Ocasio-Cortez — and it belonged to Rachel Lears.

In the earliest moments of “Knock Down the House,” Lears’s documentary about the campaigns of four liberal women, Ocasio-Cortez is shown shoveling ice and mixing martinis at her bartending job, still contemplating whether to make a run for New York’s 14th congressional district. Less than a year later, she’s a national fixation, and Lears’s documentary is premiering May 1 on Netflix, which bought the film for $10 million out of Sundance — the most ever paid for a nonfiction feature.

When Lears conceived the project alongside her producing partner and editor, Robin Blotnick, she couldn’t have imagined that she would capture lightning in a bottle. She just wanted to document a grass-roots movement as it challenged the Democratic establishment and made whatever inroads it could during the 2018 primary season. There was no reasonable expectation that Ocasio-Cortez or the other three candidates would win — one pre-election poll had her down 30 points to the incumbent, Joseph Crowley — but perhaps Lears’s film acted as a seismograph, feeling the tremors of a larger political earthquake to come.

To make the film, Lears and Blotnick raised $28,000 in Kickstarter seed money and attached themselves to two left-wing organizations, Brand New Congress and Justice Democrats, intent on changing the face of government.

“We wanted to follow the transformations of regular people into viable candidates for federal office,” Lears says. “We thought the idea of recruiting and training ordinary working people with extraordinary records of integrity and service in their communities — building a new path to Congress for them — would be really interesting to witness.”

Lears and Blotnick settled on Ocasio-Cortez early, as much for her proximity as her charisma: As New York-based filmmakers working on a shoestring, it helped to have a candidate in their backyard, so they could pop in with little expense. The other three were winnowed down from dozens of potential subjects, all with compelling personal stories, but they ultimately seized on a common denominator.

“By the end of 2017,” Lears says, “the story of women running for office in 2018 had become a big national story. I had been leaning toward focusing on women for quite a while but hadn’t really firmed up that decision until it became clear that was really a phenomenon. These women were going to be compelling to watch, win or lose, because they were all going to be long shots.”

In addition to Ocasio-Cortez, “Knock Down the House” follows primary challenges from Paula Jean Swearengin, a West Virginia spitfire whose personal misgivings with the coal industry inspired a run against Joe Manchin III, the most conservative Democrat in the Senate, and Amy Vilela of Nevada’s 4th district, a businesswoman who blames the death of her daughter on the country’s broken health-care system. But the closest analog to Ocasio-Cortez may be Cori Bush, a St. Louis nurse whose district includes Ferguson, where she took to the streets after the fatal police shooting of Michael Brown. Like Ocasio-Cortez, Bush was going after a deep-rooted incumbent, Rep. William Lacy Clay, whose seat had gone largely unchallenged since he first took office in 2001.

“Both were very entrenched,” Bush says, noting the similarities between Clay and Crowley. “For Clay, his father, Bill, [who served Missouri’s 1st district for 32 years] was one of the co-founders of the Congressional Black Caucus. And Crowley was the number four Democrat in the House. So many players were connected to them that felt a loyalty to them. And they were willing to take money that we would never take.”

Of the candidates in “Knock Down the House,” only Ocasio-Cortez actually won her primary — the others lost by double-digit margins, as perhaps could be expected from first-timers with little name recognition and major structural and budgetary disadvantages. Ocasio-Cortez’s victory proved both a boon and a challenge to Lears in shaping the film, too: She scooped the entire press on one of the year’s biggest political stories, but shifting the focus to one subject threatened to give short shrift to the other three.

While Lears acknowledges Ocasio-Cortez’s overwhelming presence in the finished film, she doesn’t feel like it upsets the balance. “It was always very important to us to include the stories of defeat, as well as victory. This is a film about a movement, and about what it takes to build this new pathway that allows ordinary people access to the halls of power. That does not happen with one victory. As Alexandria says in the film, ‘In order for one of us to make it through, a hundred of us have to try.’ That’s very much the story of social movements and the story of this electoral movement to try to transform the face of Congress.”

“Knock Down the House” is about the grit and grind of door-to-door campaigning and community organizing, but there’s a specific thrill in watching a major story unfold before it breaks. Local news media caught Ocasio-Cortez’s reaction the moment she realized she was going to win, but Lears’s camera was present on the morning when she cast her primary vote and on the car ride to her watch party, during which she refused to check the results. Asked whether she felt something different in the air that day, Lears notes the “tons of volunteers” working for Ocasio-Cortez in a low-turnout election, but otherwise demurs.

“These campaigns, they convince themselves they’re going to win,” Lears says. “Everybody’s in a bubble. It’s just so hard to know because it can feel so positive when people are coming out of the woodwork.”

For her part, Bush was defeated by a 20-point margin against her opponent in Missouri, but she’s already announced her intention to run again in the Democratic primary in 2020. Beyond building on her previous campaign, the presence of left-leaning freshmen such as Ocasio-Cortez, Rashida Tlaib and Ayanna Pressley in Congress makes a second try more plausible to her mind because she can build on their successes.

“In the past, if you were a progressive, you were kind of ‘out there.’ You didn’t have sense,” Bush says. “Now that’s changing. I remember talking about Medicare-for-all in 2016, people looked at you like you were wacko. But now they’re really talking about it.”