Sen. Robert Menendez (D-N.J.) speaks about immigration on Jan. 28. (Gary Cameron/Reuters)

When a wealthy Florida businessman needed some help with a port security contract in the Dominican Republic, his longtime association with Sen. Robert Menendez (D-N.J.) proved useful.

Eye doctor Salomon Melgen had been one of Menendez’s most loyal campaign donors and a generous friend who hosted the senator at a gated seaside manse in the Caribbean.

Last year, as Melgen donated $700,000 to support the senator’s reelection campaign and other Democrats, Menendez sought to turn up the pressure on the Dominican Republic to carry out the multimillion-dollar contract. Melgen had acquired an ownership stake in a company that had previously contracted with the Dominican Republic to provide port security.

In July, Menendez led a Senate hearing on the challenges of doing business in Latin America and urged officials from the Commerce and State departments to apply pressure to countries that didn’t honor agreements with U.S. businesses. Without naming Melgen, Menendez highlighted the contract to provide security in the Dominican port.

The U.S. ambassador to the Dominican Republic, an ally of Menendez, added his voice to the cause, according to reports in the Dominican press. In a meeting with government officials in the island nation, Ambassador Raul Yzaguirre stressed the need for the Dominican Republic to start scanning container ships entering its port for terrorist threats and drugs.

Dominican merchants were fuming at the cost — the 20-year contract was estimated to be worth as much as $500 million — and questioning how an eye doctor had branched out into port security.

Melgen “is an ophthalmologist, for Christ’s sake,” said William Malamud of the American Chamber of Commerce of the Dominican Republic. “He has no experience in port security.’’

Melgen and Menendez have been powerful players in their respective spheres. Melgen, the owner of a Florida eye clinic, splits his time between Palm Beach and his Casa de Campo estate in the Dominican Republic, where he has hosted such Democratic luminaries as former president Bill Clinton. Melgen and his companies have donated over $1 million to Democrats since 2006, according to campaign finance records.

Menendez, a member of Congress for two decades, last month became chairman of the Senate Foreign Relations Committee.

Now, Menendez’s hopes for a coming-out party as a powerful Senate chairman have been dashed. He is facing a Senate ethics inquiry about free trips he took to Melgen’s resort home.

This month, after a conservative Web site aired allegations that Menendez had accepted free trips from Melgen to Casa de Campo, the senator reimbursed Melgen $58,500 with a personal check. The money covered the costs of two round-trip flights Menendez made on Melgen’s private plane from New Jersey to the Dominican Republic in 2010, the senator’s office said. Menendez had not previously reported the paid trips as gifts or reimbursed Melgen, as required by Senate rules. Menendez’s staff blamed the error on sloppy paperwork.

His chief of staff, Dan O’Brien, said Friday that Menendez’s support for the measures to enhance port security in the Dominican Republic were justified and that the senator would “never back down” from fighting drug trafficking. “Ultimately, it’s a national security matter because these drugs end up on our streets and in our communities, fueling crime and addiction,” O’Brien said.

Melgen, meanwhile, is under federal investigation, according to two law enforcement officials. On Tuesday, FBI agents and federal health-care fraud investigators raided his Palm Beach medical offices. Armed with a subpoena and using drills and crowbars, the investigators retrieved dozens of boxes of records and computer files.

A Justice Department spokeswoman declined to comment on the nature of the probe.

Donald White, a spokesman for the Department of Health and Human Service’s Office of Inspector General, confirmed that agents and a high-level supervisor based in Miami were on the scene. White declined to specify what they are investigating, but the office’s sole mission is to fight fraud in Medicare, Medicaid and other department programs.

Melgen’s lawyer did not respond to requests for comment.

Federal officials, who spoke on the condition of anonymity because the investigation is unfolding, said no criminal charges are imminent.

Melgen became a partner in the company with the port security contract nearly three years ago.

The company had originally reached a deal with the Dominican Republic’s government a decade ago. Under the arrangement, which was approved by the country’s legislature in 2003, the firm would used X-ray equipment to screen every container coming into and out of the seaport. But the no-bid contract stirred up such a furor — with local merchants and the subsequent Dominican administration calling the 20-year contract a sweetheart deal designed to benefit the family of a top Dominican general — that the deal was left for dead.

The company, owned by the general’s widow, tried for years to get the government to implement the contract. Then, in 2010, she sought a partnership with the Melgen.

“There is a picture emerging here of Dr. Melgen using his influence with D.R. and U.S. officials to push for a contract that would be a huge windfall for him,” said Ken Boehm, chairman of the National Legal and Policy Center, who has been following the case.

The details of Melgen’s involvement in the port security arrangement were first reported by the New York Times.

In the Senate hearing last July convened by Menendez, he pressed the State Department to provide help to U.S. companies that were struggling with contracts they had arranged in the Dominican Republic. Without naming Melgen, he mentioned an American company that owned part of a contract to do security scanning in the Dominican Republic port.

Menendez called on State Department officials to “send a message that you cannot with impunity go ahead and violate those agreements.” He added, “If those countries can get away with that, they will. And that puts American companies at a tremendous disadvantage.”

Menendez has had long friendship with Melgen, both Hispanic leaders who rose from humble beginnings. In his 2009 book “Growing American Roots,” written with former Washington Post editor Peter Eisner, Menendez featured the doctor in his portraits of successful Hispanic Americans. Menendez said, “It would be hard not to mention a friend of mine, Dr. Salomon Melgen, a prominent, well-respected, enterprising ophthalmologist based in south Florida.” Menendez detailed his friend’s efforts to learn English and become a U.S. citizen and “world class physician.”

He quoted Melgen as saying, “I had an inner feeling that I was going to do whatever I had to do to make it. And I was trying hard.”

Paul Kane and Alice Crites contributed to this report.