Updated

New Jersey Democratic voters were projected to nominate Sen. Bob Menendez for a third term Tuesday, months after his trial on corruption charges ended in a hung jury.

Menendez overcame an unexpectedly strong showing from primary challenger Lisa McCormick, a Rahway publisher who garnered 38 percent of the vote with 89 percent of precincts reporting. Menendez had the support of the state's Democratic establishment and nearly $6 million cash on hand, while McCormick filed no fundraising reports and said she was running a grassroots-driven campaign.

Menendez will face former pharmaceutical executive Bob Hugin, who was projected to defeat concrete company executive Brian Goldberg easily in the Republican primary. Menendez's weak showing will give Republicans some optimism of flipping the seat in their effort to hold onto control of the Senate.

"While disgraced Senator Bob Menendez was accepting bribes in Washington, Bob Hugin was creating jobs for New Jerseyans,” National Republican Senate Committee Executive Director Chris Hansen said in a statement. "After years of nothing but embarrassment and scandal from Menendez, New Jerseyans agree it’s time for a fresh voice in the U.S. Senate, and I am confident they will choose Bob Hugin this November."

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 President Trump at the White House last year but has distanced himself from him since.

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, Celgene, 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 among many voters.

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."

Menendez has promoted himself as a check on Trump, who lost to Democrat Hillary Clinton in New Jersey in the presidential election. Democrats have nearly 900,000 more registered voters than Republicans in the state.

Voters on Tuesday also were choosing the state's 12-member congressional delegation, including selecting party nominees to replace two Republican incumbents retiring from the U.S. House.

In New Jersey's 2nd District, which covers all or parts of eight counties and includes Atlantic City, State Sen. Jeff Van Drew was projected to win the Democratic primary. Van Drew will face the GOP primary winner, former Atlantic City Councilman Seth Grossman, for the right to succeed retiring Rep. Frank LoBiondo.

In the 11th District, former Navy helicopter pilot and federal prosecutor Mikie Sherrill was projected to win the Democratic nomination by a wide margin. State Assemblyman Jay Webber was projected to win the Republican contest. Sherrill or Webber will succeed Rep. Rodney Frelinghuysen, who is retiring after 12 terms in Congress.

The Associated Press contributed to this report.