Sen. Bob Menendez will not face a new bribery and corruption trial after all, federal prosecutors said last month.

The Department of Justice had announced earlier this year that it intended to retry the New Jersey Democrat after a federal judge declared a mistrial in the case in November, but ultimately walked away from the pursuit.

Menendez was accused of accepting a plethora of donations and gifts from a wealthy friend in exchange for political influence. Both Menendez and the doctor, Salomon Melgen, maintained their innocence.

“From the very beginning, I never wavered in my innocence and my belief that justice would prevail. I am grateful that the Department of Justice has taken the time to reevaluate its case and come to the appropriate conclusion,” Menendez said on social media following the announcement.

Menendez is up for re-election this year. He was selected to replace former Gov. Jon Corzine, D-N.J., in the Senate in 2005. He rejoined the powerful Senate Foreign Relations Committee as its ranking member on Feb. 6, after stepping down from the post when he was indicted in 2015.

Read on for a look at what Menendez was accused of and what happened in the trial.

What was Menendez accused of?

Menendez, 64, accepted an abundance of campaign donations, gifts and vacations from Salomon Melgen, a Florida ophthalmologist, prosecutors alleged when Menendez faced trial in 2017. In return, prosecutors claimed, he used his position to lobby on behalf of Melgen’s business interests.

Melgen allegedly directed more than $750,000 in campaign contributions to entities that supported Menendez, according to the indictment, which prosecutors said were inducements to get Menendez to use his influence on Melgen's behalf. Prosecutors have also accused Menendez of trying to hide the gifts.

Melgen paid for Menendez and his girlfriend to stay for three nights at a Parisian hotel where rooms typically cost about $1,500 per night and allowed the senator the use of his private jet, according to prosecutors.

Federal prosecutors said that Menendez “sold his office for a lifestyle that he couldn’t afford.”

The indictment also alleged that Menendez pressured State Department officials to give visas to three young women described as Melgen's girlfriends.

What was the senator’s defense?

Both Menendez and Melgen pleaded not guilty – and Menendez has vehemently denied the accusations against him.

Throughout the original trial, defense attorneys sought to prove that Menendez and Melgen have been friends since before the former became a senator, and the trips were nothing more than friends traveling together.

Is there anything else to know about Salomon Melgen?

Melgen, 63, was convicted of 67 counts of health care fraud in April 2017 in what the Palm Beach Post called one of the biggest Medicare fraud cases in the U.S.

Melgen was sentenced to 17 years in prison on Feb. 22 for Medicare fraud, as he persuaded patients to undergo treatments they did not necessarily need.

Aside from Menendez, Melgen has given significant amounts of money to a variety of Democratic lawmakers, according to public records.

How did the trial end?

After the jury again informed the judge they could not reach a decision, U.S. District Court Judge William H. Walls declared a mistrial, saying he found “no alternative.”

The mistrial was declared on Nov. 16.

The Associated Press contributed to this report.