Katie Porter, a professor at the University of California, Irvine School of Law, on Tuesday narrowly defeated her faculty colleague, David Min, to secure a spot on the ballot for a Congressional seat following a hard-fought primary that turned ugly.

Porter snagged 20 percent of the vote—the second-highest percentage behind Republican incumbent Mimi Walters, for whom 53 percent of voters cast their ballot. Min won 17 percent of the vote, but only the top two vote-getters will appear on the November ballot under California’s primary system. (The results aren’t final, as absentee ballots have until Friday to arrive, but Porter currently has a 2,600 vote lead over Min.)