New Jersey is one of the bluest states in the country, but in late October, Democrats were nervous about the race between Democrat Robert Menendez and Republican Bob Hugin. That’s because Menendez had recently been tried on corruption charges, and only escaped due to a hung jury.

“The biggest threat to Menendez’s re-election is not so much Hugin than it is the voter who goes to the polls and decides to send Menendez a message, much the way many did in the primary when 38 percent voted for his unknown primary opponent,” the Cook Political Report’s Jennifer Duffy wrote in mid-October. “There is certainly a thumb on the scale for Menendez, who is said to have a lead of between four and six points, in this very blue state, but the race is close enough to warrant a move to Toss Up.” Menendez was still showing a solid lead in the polls, but the cloud hanging over his candidacy—and the fact that he was only running around seven points ahead of Hugin—was a cause of concern for many.

That Democrats did not encourage a primary challenge for Menendez was the source of much angst, particularly on the party’s left flank. Given the Democrats’ narrow path to taking back the Senate, locking up New Jersey was essential. Standing behind Menendez may not have been a wise decision in terms of optics, but it preserved a blue seat in the Senate.