Democratic voters, undeterred by a federal corruption case U.S. Sen. Bob Menendez had faced until it was dropped earlier this year, picked the two-term incumbent on Tuesday to represent their party in the fall campaign against a Republican former pharmaceutical executive.

Primary victories by Menendez and former Celgene Corp. chief executive Bob Hugin set the stage for New Jersey's only statewide race in November as President Donald Trump and national Republicans defend a narrowly divided Senate.

Menendez and Hugin spent the primary campaign season offering a preview of the general election, hurling insults at one another while raking in millions of dollars in campaign contributions. Hugin appeared alongside Trump at the White House last year but has distanced himself from him since.

Menendez is running for his third six-year term after facing little primary competition in his previous two elections. On Tuesday, he defeated Rahway publisher Lisa McCormick, who mounted a campaign for governor last year before backing another candidate.

Hugin, who headed Celgene until this year, is largely self-financing his campaign and had broad GOP support against Brian Goldberg, an information technology professional and construction company executive.

Democratic voters picked Menendez just weeks after the Senate Ethics Committee rebuked him for accepting valuable gifts and failing to report them while using his position to advance the donor's personal business interests. That and last year's criminal corruption trial against Menendez, which ended in a mistrial before prosecutors dropped the charges, have fueled Hugin's attacks.

In one campaign ad, Hugin showed washed-out images of Menendez with the word "disgrace."

Menendez was indicted on charges that he accepted lavish gifts, including luxury trips to Paris, from longtime friend Dr. Salomon Melgen in return for help settling a Medicaid billing dispute. He maintained his innocence throughout the prosecution, but the Senate committee admonished him over the gifts last month.

Menendez has attacked Hugin as a "greedy CEO." Hugin's firm settled for $280 million last year over allegations that it promoted cancer drugs that were not approved by the Food and Drug Administration. Celgene did not admit liability in the agreement.

Hugin, a former Marine and Princeton University graduate, has promised to serve as an independent voice for Democrat-leaning New Jersey, where Trump is unpopular.

But Hugin had been close enough to the president to attend a discussion on drug prices at the White House in early 2017. He later called the meeting "incredibly encouraging" and described the president's agenda as "pro-growth."

Polls were open until 8 p.m. for the state's Democratic and Republican voters, with contests for the U.S. Senate seat and in all but three of New Jersey's 12 House seats.

On the House side, Democratic incumbents had challengers in three races, while Republican Leonard Lance is the only member of the GOP with a challenger. Two Republican incumbents are retiring from Congress.

Take a closer look at some of the races:

NJ's Second Congressional District

What Makes up the District? All of Atlantic, Cape May, Cumberland and Salem counties; Parts of Burlington, Camden, Gloucester and Ocean counties

Who carried the District in the 2016 Presidential Race?Donald Trump won by 4 points

Why is this Race so Important?Longtime Republican Rep. Frank LoBiondo decided to retire after 24 years in Congress, leaving the district up for grabs. Democrats see this as a seat they could flip in November. Democratic party establishment recruited Jeff Van Drew to run.

NJ's Fifth Congressional District

What Makes up the District? Parts of Bergen, Passaic, Sussex and Warren counties

Who is Running?Democrats: Rep. Josh Gottheimer (Incumbent)

Republicans: Former Bogota Mayor Steve Lonegan, attorney John McCann

Who carried the District in the 2016 Presidential Race?Donald Trump won by 1 point

Why is this Race so Important?Republicans see this as a seat they can regain in November. Josh Gottheimer defeated longtime republican representative Scott Garrett in 2016. In November, he will face Steve Lonegan - who has lost recent elections for Governor, Senate and the House - or John McCann who serves as the general counsel to the New Jersey Sheriffs Association

NJ's Seventh Congressional District

What Makes up the District?All of Hunterdon County; Parts of Essex, Morris, Somerset, Union and Warren counties

Who carried the District in the 2016 Presidential Race?Hillary Clinton won by 1 point

Why is this Race so Important?After Hillary Clinton carried the district in 2016, Democrats are hoping to flip the seat in November. Democratic party leaders have backed Tom Malinowski, who has raised considerably more than his opponents. The democratic winner will likely face Rep. Leonard Lance who was first elected to the House in 2008.

Who carried the District in the 2016 Presidential Race?Donald Trump won by 1 point

Why is this Race so Important?Longtime Republican Rep. Rodney Frelinghuysen decided to retire after 24 years in Congress, leaving the district up for grabs. Democrats see this as a seat they could flip in November. Mikie Sherrill has been one of the top fundraisers in the country.

Why is this Race so Important?This is Senator Menendez's first election since he faced corruption charges. On the Republican side, pharmaceutical executive Bob Hugin has poured $7.5 million into his campaign.