New Jersey Democratic Sen. Bob Menendez exited his federal bribery trial after a mistrial Thursday with an eye on a 2018 re-election effort, but with him neither acquitted nor convicted, the cloud from the investigation remains.

The mistrial gave Democrats hoping to hold onto the seat in next year’s midterm elections cause for optimism and spurred Republicans to keep the pressure up. The stakes are high given that Republicans have a narrow 52-48 Senate majority and head into the midterm election under a historically unpopular Republican president.

Menendez, himself, was buoyed by the decision.

“To those who were digging my political grave so they could jump into my seat, I know who you are and I won’t forget you,” Menendez said.

A bi-partisan group of lawmakers on the Senate’s Ethics Committee said Thursday it would resume an inquiry into Menendez that started in 2012 and was deferred a year later because of the criminal investigation.

“His trial shed light on serious accusations of violating the public’s trust as an elected official, as well as potential violations of the Senate’s Code of Conduct,” Republican Senate Majority Leader Mitch McConnell said Thursday while calling on the committee to investigate Menendez for possible violations of the public trust and the Senate code of conduct.

The allegations that Menendez helped his friend and co-defendant Salomon Melgen with a Medicare billing dispute in exchange for luxury trips and campaign donations are likely to be included in attack ads by Republicans running against him.

Half of New Jersey voters said in a poll released in September that Menendez did not deserve re-election and only 31 percent approved of the job he was doing. The Quinnipiac University poll surveyed 1,121 people and had a margin of error of plus or minus 4 percentage points.

While it dragged down his popularity, the more than four-year criminal investigation hasn’t stopped Menendez from raising money and keeping the support of elected Democrats in the state and beyond.

Menendez has raised more than $6 million between a legal defense fund and for his 2018 re-election campaign since he was indicted in April 2015, including $2.5 million for his re-election from January through September of this year.

Menendez’s senior political adviser Mike Soliman says the two-term incumbent will decide in the coming weeks whether to seek a third term, but that all signs are that he will run, including the fact that he continued to carry out his duties during the 11-week trial.

Thursday’s news buoys Democrats, experts said, mostly because they can claim that prosecutors failed.

“Menendez today emerges perhaps stronger than ever, with the ability to rail against a Justice Department that could not successfully make a case against him,” Montclair State University political science professor Brigid Harrison said.

Former Democratic Sen. Bob Torricelli was among those planning for a possible vacancy, but said Thursday he will not run in a primary.

“I think doing the preparation of defending the seat in case of a vacancy was always the right thing to do,” Torricelli said. “I congratulate Bob Menendez and I wish him well. He has, to date, survived an extraordinary ordeal.”

While it remains to be seen whether Menendez will draw a serious primary challenge, New Jersey’s most influential Democrats on Thursday stood up for Menendez, as they have throughout the trial.

“Too many people tried to convict him without his day in court,” said Democratic Senate President Steve Sweeney.

“Should he decide to seek re-election, he will have my full support,” said New Jersey’s Democratic Gov.-elect Phil Murphy, who had declined to comment during the trial whether Menendez should step aside.