Progressive Dana Balter won the Democratic primary for New York’s 24th District Tuesday night, handing an upset to the party establishment.

Balter, a public policy professor, beat Navy veteran Juanita Perez Williams in the contentious race, which pitted the Democratic establishment against its liberal base. Balter will challenge incumbent Republican John Katko for his seat in November.

The district, which went for Hillary Clinton by 3 points in 2016, is one of the Democrats' top targets as they try to retake the House majority.

Balter, a leader of a local Indivisible chapter, received the backing of the local party. But just days after donating money to Balter’s campaign, Perez Williams jumped into the race minutes before the filing deadline, according to an Intercept report.

The Democratic Congressional Campaign Committee had urged Perez Williams to jump in and quickly put her on their coveted Red to Blue list. Candidates in the program get extra resources from the DCCC.

Four local Democratic party chairs criticized the DCCC for meddling in the race, though it’s expected for the House campaign arm to intervene in districts they are trying to flip.

"The actions in NY-24 are unfortunately just the latest example of the DCCC not taking into account the work happening at the grassroots this year," the chairs wrote. "From leaders in the Indivisible movement to party and elected officials, we stand united behind our designated nominee, Dana Balter, and against D.C. meddling that has hampered far too many races thus far."

In one of the final forums between the candidates, one voter asked about the DCCC’s involvement. Perez Williams pushed back, saying she decided to run on her own, not because she was being pressured by establishment Democrats.

Despite Perez Wiliam’s name recognition advantage, Balter prevailed, delivering establishment Democrats one of their few primary defeats.