Fred Daibes, the New Jersey real estate tycoon at the center of an international scandal threatening the career of Senator Robert Menendez, has found his way out of more than one tough spot over the course of his tumultuous life.

He spent his first 10 years in a Palestinian refugee camp before emigrating to New Jersey, court records show. At 20, after his father died, he dropped out of college to support four younger siblings, a decision that paved the way to a wildly successful career building luxury housing in Edgewater, N.J. In 2013, he survived a vicious beating inside his penthouse apartment there.

But in 2018, he faced a challenge that was far different. A 14-count federal indictment accusing him of scheming to defraud a bank he had founded threatened to upend his real estate empire and carried the risk of a lengthy prison term.

It was then, prosecutors say, that he turned to a longtime ally for help: Senator Menendez.

What followed would form the basis for federal charges that Mr. Daibes, Mr. Menendez and his wife, Nadine, and two other businessmen are now facing. All five have pleaded not guilty.

Mr. Daibes, 66, was accused of giving the Menendezes bribes in exchange for the Democratic senator’s efforts to help him in the bank fraud case by installing a U.S. attorney inclined to ease up on the prosecution. Envelopes stuffed with cash bearing Mr. Daibes’s fingerprints and nine bars of gold bullion with serial numbers tracked to him were seized during a search of Mr. Menendez’s home, according to federal prosecutors in Manhattan.

Still, the senator’s effort to meddle in the bank-fraud case failed, prosecutors said.

“I don’t want him to be upset over it,” Mr. Daibes wrote in a text message to Ms. Menendez as his case proceeded toward trial. “This is not his fault he was amazing in all he did he’s an amazing friend and as loyal as they come.”

In the end, there was no trial. Mr. Daibes pleaded guilty to a single count of making false entries in connection with a $1.8 million loan document as part of an agreement, approved by the U.S. attorney’s office in New Jersey, that required no prison time.

Last week, however, a judge rejected that plea agreement, scuttling the original deal altogether and complicating an already sprawling web of allegations that poses new threats to Mr. Daibes’s real estate empire.

On Friday, his lawyer in the New Jersey federal case, Lawrence S. Lustberg, formally withdrew Mr. Daibes’s guilty plea.

Both cases — the accusations of bank fraud and bribery — have tainted Mr. Daibes’s legacy as the chief architect of Edgewater’s rebirth.

Forty years ago, the borough of Edgewater was struggling. The narrow ribbon of land adjacent to the Hudson River, facing Manhattan, was once home to factories where Ford manufactured cars, Alcoa made toothpaste tubes and Quanta Resources produced roofing tar. But the companies had shut down, leaving environmental contamination in their wake.

In the 1980s, Mr. Daibes, a mason’s son, hopped on a wave of postindustrial redevelopment already taking place downriver, in Hoboken and Jersey City. While taxpayers financed much of Edgewater’s environmental cleanup, Daibes Enterprises built thousands of residential units, plus office suites, retail complexes and a golf range. Its working-class bars long gone, Edgewater’s bustling business district today includes Whole Foods and Trader Joe’s, multiple fine restaurants and a seven-story day spa with a rooftop pool.

As Mr. Daibes’s high-rises went up, the population roughly tripled — to 14,600 — over three decades.

Robert D’Angelo, the owner of Roberto’s II, a family-run restaurant in business since 1962 in Edgewater, said Mr. Daibes put the borough on the map yet never forgot his humble roots.

After Hurricane Sandy, Mr. D’Angelo said Mr. Daibes was one of the first people to arrive at the restaurant once the roads reopened. Mr. Daibes helped him clean up and put him in touch with electricians, plumbers and carpenters.

“Without him, it would have taken me months to reopen,” Mr. D’Angelo, 63, said.

“He took himself up from the bottom and he never forgot anyone on the way up,” he added.

A local media fixture, Mr. Daibes was featured in a magazine spread about his classic and exotic car collection, including a red 1957 Jaguar XK140, a silver 2005 Bentley Continental GT with a turbocharged W-12 engine and a pair of Mercedes-Benz SLR McLarens.

His high profile, though, came at a cost. Two days before Thanksgiving, in 2013, four people broke into his penthouse at the St. Moritz, one of his buildings, tied a bag over his head and beat him, breaking his ribs, dislocating a shoulder and bruising his face. They left with at least $2 million in cash, gold and jewelry. When they were arrested, one turned out to be a confidant of Mr. Daibes living in the same building. The four struck plea agreements to serve 12 to 18 years in prison.

Last month, prosecutors in Manhattan unsealed a 39-page indictment against Mr. Daibes, the Menendezes and the two other businessmen, Wael Hana and Jose Uribe.

It said that Mr. Daibes provided financial backing to Mr. Hana, an Egyptian-American businessman who was later awarded a lucrative contract giving his company, IS EG Halal, the sole rights to certify that products imported to Egypt had been prepared according to Islamic law. IS EG Halal operates from a building in Edgewater owned by a company run by Mr. Daibes, who also has offices there.

In turn, Mr. Menendez, as chairman of the Senate Foreign Relations Committee, helped direct aid and weapons to Egypt, prosecutors said.

Mr. Daibes’s lawyer in the Manhattan criminal case, Tim Donohue, said his client’s financial link to Mr. Hana was limited to an “arms-length loan.”

“Mr. Daibes is not an owner or investor in that business,” Mr. Donohue said about IS EG Halal.

By then, Mr. Daibes was a major fund-raiser for Mr. Menendez, a Democratic power broker who has represented the region since he was appointed to the Senate in 2006, prosecutors and federal election records show.

Similar generosity had helped earn Mr. Daibes a role as kingmaker in Edgewater, at the expense of taxpayers, according to a recent state investigation.

Mr. Daibes provided Edgewater officials free or reduced rents in apartment buildings he owned and awarded a flooring job to a councilman’s company in exchange for favorable treatment in business deals, state investigators found.

“Daibes’s power and influence within Edgewater were so strong he even held sway in local political decisions and other municipal concerns,” New Jersey’s Commission of Investigation found.

“Municipal officers who took official actions unsupportive of the developer faced political and professional retribution,” investigators added. Mr. Daibes, through his lawyer, has rebutted the allegations and said that the rental benefits were gifts provided to longtime friends.

At least one of the subpoenas issued, before the three-count indictment was announced last month in Manhattan, requested information about legislation pending in New Jersey that could have derailed a major high-rise residential project Mr. Daibes was planning at 115 River Road in Edgewater.

The project had lost its financing after getting bogged down in a delayed environmental cleanup, court records show. But late last year, Mr. Daibes traveled to London and Qatar to meet with potential new lenders.

In January, he finalized a $45-million shared-ownership agreement for the Edgewater project with a company founded by a member of Qatar’s royal family, Bergen County deed records show. It is unclear how his new legal challenges might affect that project.

A judge has scheduled trial on the bribery-related charges for May 2024, in a courthouse in Lower Manhattan, 10 miles from Edgewater.