“The Chevrons of the world, the Koch Brothers and the others … their religion is greed … we cannot allow them to take over Richmond,” Vermont Senator Bernie Sanders told a packed auditorium in Richmond, Calif., last month. Sanders’ appearance drew national attention to local races there that have since become a symbol of the tension between grass-roots politics and big money’s influence on elections.

And on Tuesday, this city of more than 100,000 garnered national headlines when it became one of the few spots in the country where progressive underdogs triumphed, even though they were heavily outspent by their opponents.

Here the battle lines were defined by one big donor, the multinational oil giant Chevron, which operates a century-old refinery in Richmond. Candidates who had accepted backing from Chevron fought an alliance of progressives who had not.

The company spent more than $3 million on the Richmond election. But voters there rejected the candidates Chevron supported in favor of a scrappy, volunteer-driven coalition that included Richmond’s current mayor, a soft-spoken former schoolteacher and Green Party member named Gayle McLaughlin who ran for city council this year after reaching the end of term limits. Also among the winners were Jovanka Beckles, the openly gay vice mayor who successfully championed a higher minimum wage there; Eduardo Martinez, also a former teacher; and longtime local politician Tom Butt, who won the mayoral seat. Now up to six of the city’s seven council seats may soon be occupied by Chevron critics, according to The Contra Costa Times.

For years, Richmond was known in the San Francisco Bay Area simply as a hub of high crime, pollution and poverty. Politicians here had unabashedly close ties to Chevron — until 2008, most local elected officials were sympathetic to the company, which maintained a desk in the city manager’s office through the 1990s. But city politics began to change in 2004, when McLaughlin won a city council seat and then, two years later, became mayor.

The city has since risen into the national spotlight several times, partly because of McLaughlin’s willingness to take on Chevron, which is Richmond’s largest taxpayer and employer. Last year, the city sued the refinery after a 2012 fire sent thousands to area hospitals complaining of respiratory problems. “We don't see Chevron as the source of keeping our economy going,” McLaughlin said defiantly at the time.

In response, Chevron has gone to great lengths to try to regain public sympathy, and to oust its opponents from local office. Earlier this year, the company launched its own online news outlet, the Richmond Standard, which offers both daily stories on local events and a section called “Chevron Speaks,” where the company posts its views. In the weeks before the election, the company plastered local billboards and stuffed residents’ mailboxes with ads attacking McLaughlin and her allies and supporting candidates backed by Moving Forward, one of its Richmond-based political action committees.