ORLANDO, Fla. — When Rep. Matt Gaetz vacationed in the Bahamas in 2018, he was joined by a doctor who donated to his campaign and a former colleague in the Florida Legislature.

Gaetz, Dr. Jason Pirozzolo and Halsey Beshears were united in their enjoyment of politics, fancy travel and the company of beautiful women.

They also had another mutual interest: Florida’s $1.2-billion medical marijuana industry.

The trip is a central element of a federal investigation surrounding Gaetz that has endangered his political career. What began as an inquiry into sex trafficking and whether the Republican paid women and a girl for sex has grown into a larger review of public corruption, according to people familiar with the investigation.

Investigators are looking at whether Gaetz and his associates tried to secure government jobs for some of the women, the people said. They are also scrutinizing Gaetz’s connections to the medical marijuana sector, including whether Pirozzolo and others sought to influence legislation Gaetz sponsored. The investigation includes legislation from 2018, when Gaetz was in Congress, and earlier work in the state Legislature, according to one of the people.

Pressure on the congressman could build in the coming weeks as Joel Greenberg, a Gaetz associate who has been accused of trafficking a minor for sex, faces a May 15 deadline to strike a plea deal with prosecutors. If he does, Greenberg may be pressed to deliver damaging information against Gaetz.

No one on the Bahamas trip has been charged with a crime. Gaetz has denied wrongdoing and retained high-powered lawyers. He and his representative did not respond to a message seeking comment.

Beshears and a lawyer for Pirozzolo declined to comment.

The Associated Press spoke with more than 10 people familiar with the dynamic among Gaetz, Pirozzolo and Beshears. Three had knowledge of the investigation. They all spoke on condition of anonymity because they were not allowed to publicly discuss the inquiry.

Gaetz’s interest in medical marijuana dates back nearly a decade, when he was a member of the Florida House of Representatives. Well before he would gain national attention for his steadfast support of Donald Trump, Gaetz carved out an unusual reputation as a Republican who wanted to liberalize marijuana laws.

In February 2014, Gaetz co-sponsored the first state effort to allow marijuana for medical use. His proposal allowing the use of a non-hallucinogenic marijuana extract was limited to patients with cancer or a severe form of epilepsy and slowly earned the support of his father, Don Gaetz, who was then president of the Florida Senate.

Gaetz cast his proposal as a pared-down alternative to a statewide ballot measure that would have broadly legalized medical marijuana. His law was approved with broad bipartisan support and signed into law by Republican Gov. Rick Scott in June 2014, while the statewide measure narrowly failed at the ballot box that November.

The day Gaetz’s measure was up for a final debate and vote in Florida’s House of Representatives, Pirozzolo and Beshears were on the floor.

Beshears was a fellow GOP member of the Legislature who joined Gaetz to support the legislation. Pirozzolo was there serving as the physician of the day for the lawmakers — a role he would frequently take on by flying his own plane to Tallahassee.

Once the legislation passed, it created lucrative opportunities for Beshears’ family and Pirozzolo.

The long-standing nursery owned by Beshears’ family was awarded one of five highly coveted licenses to cultivate and dispense medical marijuana.

The legislation was written to specify — and restrict — who could win such a license. An amendment added by another lawmaker in the Florida House limited the pool of applicants to nurseries that had been in continuous business for 30 years and had an inventory of 400,000 or more plants.

The Beshears family nursery met that standard.

The Tampa Bay Times reported in 2014 that Beshears had failed to file a conflict-of-interest report when he voted on the bill, and the lawmaker who sponsored the amendment wanted to “err on the side of limiting who could qualify now” when embarking on such a new industry. More licenses have since been awarded, but the industry is still tightly controlled.

Another amendment added to the 2014 legislation the day Pirozzolo watched in the House required dispensary applicants to employ a doctor as a medical director.

Eight days later, Pirozzolo started a consulting firm connecting marijuana businesses with medical directors, the Orlando Sentinel reported. He later co-founded a group called the American Medical Marijuana Physicians Assn., which advocates for doctors who recommend medical cannabis.

Gaetz has spoken at least twice at the association’s annual conferences, according to the group’s social media posts and the recollections of a member.

With recommendations from Gaetz and Beshears in 2018, Pirozzolo was appointed by Gov. Ron DeSantis to serve on a board that runs Orlando International Airport.

Two years after Gaetz’s first medical marijuana law, he sponsored another measure in the Florida Legislature to expand on it, allowing near-death patients to use non-smokable marijuana of all strengths and doses.

The day it came up for a vote in the Florida House, Beshears voted for it, and Pirozzolo witnessed it, again serving as the doctor of the day.

By the time Gaetz was in Congress in 2018, he introduced legislation that would increase the number of entities that would conduct cannabis research. The legislation included provisions similar to what Pirozzolo’s group was pushing to also expand research.

Nearly five months later, the men would meet in the Bahamas.

Price and Balsamo write for the Associated Press.