These are the top contributors who helped keep Menendez out of prison

Beating corruption charges was not cheap for Sen. Bob Menendez.

Through Dec. 31, the Democrat from Paramus spent nearly $4.5 million on lawyers.

That money did not come from taxpayers. It didn't come from Menendez's campaign. And Menendez himself couldn't pay it: Among the 100 senators in 2015, he was the 11th poorest, according to the Center for Responsive Politics.

So Menendez got a lot of help from his friends who gave more than $5.1 million between early 2014, when federal agents began investigating and he created a legal defense fund, and the end of last year.

Menendez was accused of accepting political contributions and luxury travel as bribes in exchange for using his office to promote the personal and business interests of his co-defendant and longtime friend, Salomon Melgen, a Florida ophthalmologist. Both denied the charges.

Special investigation: People are dying after procedures in NJ surgery centers and it's not always made public

NJ marijuana legalization: Black lawmakers see vision of NJ high on legal weed

Melgen was convicted separately on charges of Medicare fraud in Florida. He was sentenced to 17 years in prison on Feb. 22.

An 11-week trial in Newark on the corruption charges ended in November with a mistrial, and one juror said afterward the panel was deadlocked 10-2 in favor of a "not guilty" verdict. On Jan. 24, the judge who presided over the trial issued a ruling that acquitted Menendez and Melgen on some of the most serious charges. The following week, prosecutors dropped the remainder of the case.

Menendez still faces an investigation by the ethics committee in the Senate, but no longer faces the threat of going to prison.

Here's who gave the most, based on The Record's analysis of disclosure reports filed with the Internal Revenue Service.

Here's a rundown of all of the top donors and some of their connections to Menendez.

$205,000: Applied Cos. / Ironstate Holdings

Members of the Barry family and employees of their real estate companies, Applied and Ironstate, have been longtime Menendez supporters. They are major builders in Jersey City and Hoboken, cities that benefited greatly from projects Menendez helped steer their way. Patriarch Joseph Barry, who gave $10,000 in 2015, was sentenced to 25 months in federal prison in 2004 after admitting he bribed Hudson County Executive Robert Janiszewski .

$100,000: Canoe Brook Management

Canoe Brook is described on its website as the investment office of the Goldberg, Klatt and Tyscher families, founders of Roseland Property Co., a "multi-billion dollar" company that developed along the Hudson waterfront when it was sold in 2012. Principals from all three families made contributions to help Menendez defend himself from what Carl Goldberg said were "politically motivated charges." The company touts its "history of effective engagement with state and local government officials."

$100,000: Inserra family / ShopRite

Owners of nearly two dozen supermarkets in North Jersey and Rockland County, N.Y., the Inserras also rank among the top 20 campaign contributors to Menendez during his career in Congress. Second-generation company leader Lawrence Inserra Jr. is also chairman of board of the Hackensack University Medical Center Foundation.

$80,500 Lowenstein Sandler law firm

The Roseland-based law firm of Lowenstein Sandler has been the No. 1 contributor to Menendez throughout his career in Congress, according to the Center for Responsive Politics. The firm employs the senator's son. Of the 13 lawyers who gave to the legal fund, the most came from the chairman and managing partner, Gary M. Mingens, who gave $25,000. The chair of the firm's bankruptcy practice, Kenneth J. Rosen, gave $20,000.

$80,000 Philip M. and Betsy Darivoff

The Short Hills couple each gave the maximum $10,000 each year from 2014 through 2017. Philip Darivoff is a former Goldman Sachs executive who now serves as chairman of the investment firm DFG. He's a national board member of the America Israel Public Affairs Committee.

$72,500 Federated Investors Inc.

Eight employees of the Pittsburgh based investment company contributed in 2015, and three of them gave again in 2016. The company's lobbyist in Washington, Michael Hutton, is a former chief of staff to Menendez.

$65,500 Nikos Mouyiaris / MANA Products

Mouyuiaris, his relatives and employees at cosmetics manufacturer MANA contributed to the defense fund in each of the four years it operated. Mouyiaris is on the board of groups focused on Greece and Cyprus, and gave $800,000 to Rutgers University for modern Greek studies. Menendez attended a 2013 fund-raising dinner where his gift to Rutgers was acknowledged.

$62,500 Greenberg Traurig law firm

The global firm with 2000 attorneys in 38 locations and a Washington lobbying practice with clients that include Samsung, Bayer and the American Trucking Associations. The top donor to the defense fund, giving $30,000 over three years, was Philip R. Sellinger, co-managing shareholder in the firm's Florham Park office. In 2012, Sellinger hosted a fund-raiser for Menendez at his Morris Township home where the guest of honor was Vice President Joe Biden.

$55,000 Grover and Patricia Connell

Ranked among the 50 richest people in New Jersey by njbiz.com in 2016, Grover Connell is a longtime political contributor whose privately held company in Berkeley Heights focuses on commercial real estate, mining and finance, among other things. He was also one of the most reliable contributors, giving to the fund each year from 2014 through 2017.

$54,000 NJ politicians / Democratic leaders

This group includes Sen. Cory Booker, the Newark Democrat whose political fund gave $10,000 each in 2015 and 2016; South Jersey political leader George Norcross and his brother, Phil Norcross, who each gave $10,000 in 2015; now-Gov. Phil Murphy, who gave $10,000 that year; former West New York Mayor and Assemblyman Sal Vega, who gave $1,000 in 2015 and another $1,000 in December after the trial was over. Also giving $1,000 in December were North Bergen Mayor and State Sen. Nick Sacco and then-Assembly Speaker Vincent Prieto of Secaucus.

$51,000 Tom James Company

Executives of the bespoke clothing maker contributed over a three-year period, with $20,000 coming in 2015 and 2016 from executive chairman Spencer Hayes, who died in 2017.

$50,000 Harley and Marie Lippman

Harley Lippman is chief executive officer of the information technology staffing firm Genesis10. He is also an executive committee member of AIPAC, the pro-Israel advocacy group.

$50,000 Haim and Cheryl Saban

Israeli born film and television producer Haim Saban, the founder of Saban Capital Group whose credits include 11 Power Rangers television series, also gave $7 million to a super PAC that supported Hillary Clinton's presidential campaign. Saban also sponsors a political leadership training seminar through AIPAC.

$50,000 Martin and Lauren Schor Geller

Martin Geller is founder and president of Geller & Company, a financial services advisory firm; a board member of Bloomberg LP and Bloomberg BNA, the financial news companies; and co-owner of the Philadelphia 76ers basketball team. He is also a member of the Northeast Regional Council of AIPAC.

$45,000 Richard H. and Dvorah Roberts

Lakewood pharmaceutical executive Rich Roberts' support for Republicans included giving $750,000 to a super PAC backing Mitt Romney in 2012 and serving on a Jewish advisory council for Donald Trump's presidential campaign. But according to the Lakewood Scoop, he also hosted a lunch in 2015 for Menendez the same day he and his wife gave $10,000 each to the legal defense fund, and another person at their address with the occupation of "student" gave $5,000. Roberts and his wife gave another $20,000 the following year,

$40,000 Sheldon and Miriam Adelson

Casino magnate Sheldon Adelson and his wife gave $10 million to a super PAC that supported Newt Gingrich's losing campaign for the Republican presidential nomination in 2012, then donated $10 million to a pro-Romney PAC.

$40,000 KRE Property Mangement

The K in the company's name is for Kushner, and the company is run by Jonathan Kushner, the son of Murray Kushner, the estranged uncle of Trump son-in-law Jared Kushner. Murray and brother Charles Kushner had a public split over running the family business before Charles was convicted in 2005 of illegal campaign contributions and witness tampering.

$40,000 David and Sylvia Steiner

David Steiner, a real estate developer, is a former president of AIPAC.

$40,000 Florio, Perucci, Steinhardt Fader

Florio is former Gov. Jim Florio, a Democrat, and Steinhardt is Republican State Committee chairman Doug Steinhardt. But most of the money came from co-founder Michael Perucci.

$40,000 Spanish Broadcasting System

Chairman and CEO and president Raul Alcaron Jr. gave the maximum $10,000 in 2014 and 2016, and he and company executives have long been top contributors to Menendez. During his 2006 campaign for Senate, Republicans criticized Menendez for taking contributions from Spanish Broadcasting in 1999 and then taking the company's side against a merger of two competing Spanish-language media companies. Menendez said he was opposed to concentration of media outlets, which he called a "danger to democracy."

$40,000 Panayiotis and Peter Panicolaou

As a House member in 2002, Menendez sponsored a resolution honoring Panayiotis Pananicolaou, a Brooklyn contractor, for winning the Justice for Cyprus award from the Cyprus Federation of America.

$40,000 Diaco family/ AJD Construction

Leonardo-based construction company president Anthony J. Diaco and three relatives all gave $10,000 in 2015 to the defense fund, and have supported Menendez's campaign accounts. Although, Diaco also contributed in 2012 to Menendez's opponent, Republican state Sen. Joseph Kyrillos of Monmouth County.

$40,000 Peter and Janine Lowy

Peter Lowy is the co-chief executive officer of shopping mall owner Westfield Corp., and a founder of the Australia-based Lowy Institute for International Policy.

$40,000 Michael and Jacqueline Kempner

Michael Kempner of Cresskill is founder and CEO of East Rutherford-based MWW Group, a public relations and lobbying firm who was a major fund-raiser for both Barack Obama and Hillary Clinton. Along with contributing to the legal fund in 2014 through 2016, MWW was paid $25,000 in 2015 for public relations services and rented the legal fund a room for an event, according to disclosure reports.

This story has been updated to correct the contribution from Phil Murphy to $10,000.