The Justice Department is investigating Rep. Matt Gaetz — a Florida Republican considered a close political ally of former president Donald Trump — over an alleged sexual relationship with an underage girl, according to people familiar with the matter, though the probe has been complicated by the congressman’s assertion that his family is being extorted.

The investigation into Gaetz began some time last year, when Trump was still in office, after a criminal case against a different Florida politician led investigators to allegations that the congressman had a sexual relationship with a 17-year-old girl and paid for her travel, a person familiar with the matter said on the condition of anonymity to discuss an ongoing investigation. As that probe was underway, the person said, Gaetz’s family raised allegations that the congressman was being extorted, and the FBI separately is exploring those claims.

The Justice Department activity, which had been conducted in secret for months, burst into the open Tuesday when the New York Times published a report on the investigation into the alleged sexual relationship, and Axios published an interview in which Gaetz confirmed the probe but said the allegations against him were “rooted in an extortion effort against my family.”

Separately, Axios reported Tuesday that Gaetz was telling confidants he was contemplating not seeking reelection and possibly leaving his post early for a job at Newsmax, a conservative media outlet.

Rep. Matt Gaetz (R-Fla.) addressed new, public allegations that he had a sexual relationship with a 17-year-old girl on "Tucker Carlson Tonight" on March 30. (The Washington Post)

Gaetz repeated his extortion claim in a statement and then on Fox News, saying someone had been “seeking $25 million while threatening to smear my name.” He said that his father, Donald Gaetz, a former president of the Florida Senate, had received a text message on March 16 demanding a meeting, and that on Wednesday, his father was supposed to contact a former Justice Department official “so that specific instructions could be given regarding the wiring of $4.5 million as a down payment on this bribe.” Gaetz said his family had contacted the local FBI about the matter.

Gaetz identified the former Justice Department official as attorney David McGee, a former federal prosecutor in Florida now at the firm Beggs & Lane.

In an interview, McGee disputed that he was part of any effort to extort Gaetz or that he was connected to the Justice Department’s investigation of possible sex trafficking by the congressman. He said Gaetz’s father had “called me and asked to talk to me,” though McGee declined to say what the conversation entailed.

“It is completely false. It’s a blatant attempt to distract from the fact that he’s under investigation for sex trafficking of minors,” McGee said, adding, “I have no connection with that case at all, other than, one of a thousand people who have heard the rumors.”

Gaetz asserted that his family had been cooperating with the FBI and that his father had even worn a wire to record interactions. He said that at the Justice Department’s request, his father had made a recording at the Beggs & Lane firm, and the congressman called on the FBI to release the tapes.

“I know that there was a demand for money in exchange for a commitment that he could make this investigation go away, along with his co-conspirators,” Gaetz told Fox News.

McGee said he would welcome the release of a tape of his conversation with Gaetz’s father.

“If there is a tape, play the tape,” McGee said. “There is nothing on that tape that is untoward. It is a pleasant conversation of a dad concerned about his son and the trouble his son was in.”

The Justice Department and the FBI declined to comment. Efforts to reach Donald Gaetz were not successful Tuesday night.

Matt Gaetz also alleged on Fox News that those trying to extort him “claimed to have specific connections inside the Biden White House” and were “promising that Joe Biden would pardon me,” though Gaetz insisted the allegations of his relationship with the 17-year-old were false.

“No part of the allegations against me are true, and the people pushing these lies are targets of the ongoing extortion investigation,” Gaetz said in a statement.

Gaetz has not been charged with any crimes, nor has anyone been accused by the Justice Department of trying to extort him.

The investigation into Gaetz’s alleged relationship with the 17-year-old grew from a federal case against a different Florida Republican: Joel Greenberg, a former Seminole County tax collector who was charged last summer with sex trafficking of a child and a medley of other offenses.

According to an indictment in the case, Greenberg abused his access to a statewide database, using it to look up the personal information of people with whom he was in “sugar daddy” relationships, including the minor, and to help produce fake identification documents to “facilitate his efforts to engage in commercial sex acts.” He was also accused of seeking to undermine a political opponent by surfacing fabricated evidence of racism and misconduct.

Greenberg, who pleaded not guilty and is scheduled to go to trial in June, did not respond to a message seeking comment left at what appeared to be a phone number listed for him in public records. He resigned his political office after he was charged. The Washington Post was unable to learn immediately how Greenberg’s case connected to the allegations against Gaetz, or any details about the 17-year-old with whom Gaetz was alleged to have had a relationship.

A 2019 photograph that Greenberg posted on Twitter shows him with Gaetz at the White House. He also posted a picture in 2017 of him with Gaetz and Roger Stone, another well-known Trump political ally.

As a frequent guest on cable news, Gaetz was sometimes called the “Trumpiest” member of Congress for his seemingly ceaseless promotion of the former president.

A politician from the Florida Panhandle, Gaetz began serving in the state legislature in 2010, when he was best known for pushing to decriminalize marijuana use. In 2016, he won a seat in Congress and as a lawmaker has been outspoken in defense of Trump on impeachment and other issues.

In so doing, Gaetz has regularly courted controversy and been criticized as violating norms of behavior and decorum.

A day after the U.S. Capitol riot on Jan. 6, Gaetz argued without evidence that the offenders included members of the leftist movement antifa masquerading as Trump supporters.

In 2019, Gaetz led about two dozen GOP lawmakers who stormed into a secure room in the Capitol used for hearing and handling classified information, disrupting witness testimony related to Trump’s impeachment.