Correction appended: Feb. 18, 2013

Every day in a steady stream, hundreds of trucks line up at the Multimodal Caucedo port in Boca Chica, Dominican Republic, with shipping containers bound for the rest of the world. Mostly they carry bananas, clothes and other legal exports. Sometimes they are full of cocaine.

In recent years, the containers have become one of the favored methods for drug traffickers operating in the Dominican Republic, security officials say. Perhaps that’s because the country’s sole X-ray machine scans less than 5% of the containers.

Efforts to solve that problem are at the root of a growing scandal surrounding a powerful U.S. Senator, New Jersey’s Robert Menendez, chair of the Foreign Relations Committee, and a high-flying Florida ophthalmologist, Salomon Melgen, who is among the Democratic Party’s biggest donors.

A decade ago, the Dominican government signed a deal with a private company to provide more X-ray machines. But because of high costs and claims that the deal gives the company a monopoly, it’s been held up in court; the machines were never installed. That’s left in limbo the contract, worth upwards of $500 million over 20 years, and the company that now holds it, Florida-based Boarder Support Services, which was formed by Melgen.

(MORE: Bob Menendez’s Very Bad Week)

Enter Menendez, who soon began pushing U.S. officials to force action on the stalled contract, even as he flew on Melgen’s private jet and received at least $700,000 in campaign contributions from him. Menendez has denied any impropriety. “Nobody has bought me,” he told the Spanish-language Univision in an interview. He said his focus in bringing up the subject at a Senate hearing last year was to limit drug trafficking.

Melgen, who is known to enjoy hobnobbing with powerful political types, has kept a low profile since the allegations emerged. Through a spokesman, he declined a request to speak with TIME. In a statement through his lawyer, Alan Reider, Melgen says he “acted appropriately at all times.” In interviews with friends and family and through public records, a portrait has emerged of Melgen as a generous, well-liked doctor whose business pursuits have often caused him financial trouble.

Melgen came from a well-known family of Lebanese and Palestinian descent. His father was also an eye doctor. He arrived in the U.S. in 1979, landing positions at prestigious American institutions, such as Harvard and Yale, before founding Vitreo-Retinal Consultants in West Palm Beach, Fla., in 1988, according to his résumé.

Few have questioned Melgen’s work as a physician. He’s won praise for pro bono treatments, like that for a 28-year-old engineer who was shot in the face during a carjacking in Santo Domingo last year. Melgen operated on the woman, Francina Hungría, free of charge in the hopes of restoring some of her sight.

“What I can tell you is that he’s an excellent person and a great physician,” says Rafael Antun, a Miami-based urologist who has known Melgen since childhood. “As a friend, I know what type of person he is: a great person and a great physician.”

(MORE: Goodbye John Kerry, Hello Bob Menendez)

His successful practice earned him a spot among well-heeled individuals in the U.S. and in the Dominican Republic. He first became friends with Menendez in the early 1990s and more recently shuttled the Senator around in a private jet (trips that Menendez paid $58,000 for last month) and hosted parties at his villa in Casa de Campo, a gated vacation-and-golf development where celebrities like Bill Gates and the Kardashians have vacationed.

Over the years, Melgen reportedly became friends with political heavyweights like Bill and Hillary Clinton, Senators Chris Dodd and Bob Graham and former Dominican President Leonel Fernández. When Melgen’s son was married in 2009, the Dominican Catholic Cardinal performed the ceremony. Photos on celebrity pages showed well-known guests, like members of the Fanjul family, Florida-Caribbean based owners of a sugar and real estate fortune.

He has also showed a taste for risky investments. According to court records, Melgen has lost millions in investments gone awry. He sued the likes of Bank of America and Citigroup, claiming he lost money because of misleading company statements. Separately, a South Florida Ponzi scheme cost him at least $5 million.

By comparison, the contract to install X-rays at Dominican ports must have looked like a sound investment. It was signed in 2002 between the Dominican government and ICSSI, a company owned by the widow of a powerful military general.

Melgen began talks to buy at least a 50% stake in the company in 2006. Reider says Melgen exercised that option in 2011 after no objection was raised by then President Fernández. He bought the remaining 50% in February of 2012 and remains the only shareholder. He eventually paid about $100,000, according to La Lupa Sin Trabas, a Dominican magazine that first documented the deal.

Back in Washington, Menendez had co-sponsored legislation that required all containers going into the U.S. to be scanned. Melgen stood to make a fortune if the contract could get out of courts. Conservative estimates put the contract’s value at half a billion dollars over 20 years.

Vinicio Castillo, a prominent Dominican attorney and Melgen’s cousin, says the X-ray machines are needed to combat a rise in drug trafficking through the ports. Castillo’s father Vinicio “Vincho” Castillo, the country’s drug czar, has also spoken publicly about the need for the machines.

“There are powerful interests at play here who do not want to see the contract for X-ray machines go forward,” the younger Castillo says.

Contacted by TIME, private industry groups, including the American Chamber of Commerce of the Dominican Republic and the Dominican Shipping Association, said they are in favor of installing the machines. However, they oppose certain terms of the contract. Currently, Dominican customs agents with support of U.S. Customs and Border Protection operate the country’s one X-ray machine, donated to the Multimodal Caucedo port in 2006 by the U.S. government. Under ICSSI’s contract, the private company would take over the scanning.

The customs office says scanning containers is the government’s job and should not be outsourced to a private company. Customs officials have also questioned the legitimacy of the contract because a member of the Dominican armed forces, rather than customs, signed it.

But a spokesman for Melgen says Boarder Support Services would not handle the inspections itself, nor would Smiths Detection, the planned vendor of the X-ray machines. “Dominican customs officials will be the personnel inspecting all the containers,” Reider said in a statement to TIME.

Another issue is the cost — about $95 for large containers (currently, scans are free) — although ICSSI took out a full-page newspaper ad this week saying it would be willing to reduce rates. Critics have also argued that the contract gives the company a monopoly that may violate international trade rules and DR-CAFTA, a regional trade pact between the U.S., the Dominican Republic and Central American countries.

With the contract held up in courts, Menendez urged Obama officials to intervene. In a July 31 Senate hearing, he pressed a State Department official on the issue. “I look at the Dominican Republic, for example … you have another company that has American investors that … has a contract actually given to it — ratified by the Dominican Congress — to do X-rays of all the cargo that goes through the ports, which have been problematic and for which in the past narcotics have been included in the cargo. And they don’t want to live by that contract,” he said. “I hope you’re going to look at the Dominican Republic.”

The New York Times reported that Menendez also contacted the Department of Homeland Security about whether the department was preparing to donate port-security equipment to the Dominican Republic because that might undermine the terms of Melgen’s contract. There was no indication, however, that the government had a machine to donate.

A State Department official declined to comment because of an active Senate Ethics Committee investigation.

Melgen, meanwhile, has remained in Florida and continues to see patients, friends say. “He is calm. He knows the truth will come out,” Castillo says. “Lamentably, he bought into a company that has become the center of all this.”

Correction: The original version of this story said Melgen was an optometrist. He is an ophthalmologist.