An epic shouting match between two of Wall Street’s biggest loudmouths is headed to court.

Guy Gentile — a stockbroker and former FBI informant who in 2017 accused his ex-girlfriend of driving his Mercedes-Benz into his swimming pool — has sued a rival investor for $25 million over defamation, The Post has learned.

Short-seller Marc Cohodes, who made a bundle betting against Valeant Pharmaceuticals and Home Capital Group, allegedly has been slandering Gentile on Twitter, accusing him of being a “greaseball,” an “asshat,” and even a “wife beater,” with the latter allegation based on an allegedly “altered” police report, the suit claims.

The bruising back-and-forth apparently started on Dec. 10, when Cohodes — whose Twitter account has almost 35,000 followers — went after Gentile for his hyping of Lannett shares.

“The good think [sic] about @GuyGentile is he is well known in Pump and Dump circles which is all he is,” Cohodes wrote.

“The only thing I pumped and dumped was your wife…tell her to loss [sic] my number!” Gentile shot back.

Cohodes’ motivation, according to a complaint filed this week in California state court, was to drive down the stock price of generic drugmaker Lannett. In doing so, Cohodes has cost Gentile “tens of millions” of dollars on his Lannett investment, according to the suit.

For nearly 10 months, the two have traded jabs over the social networking site, with Cohodes predicting that federal authorities would soon indict Gentile for stock fraud.

“He is Radioactive and Full of More Sh– than a Christmas Turkey,” Cohodes wrote a few days after their opening salvos, adding that “Guy Gentile belongs behind bars.”

In late April, Gentile’s suit claims, former DEA agent James J. Hunt approached several of his personal professional associates to “obtain negative information about Gentile.”

A few days later, on May 3, a since-removed blog post on the financial site Seeking Alpha claimed Gentile was being pursued by the Securities and Exchange Commission for stock manipulation. Gentile denies that he is being pursued by the regulators. The SEC didn’t return a request for comment.

The blog post also published a “screen shot of an improperly obtained and subsequently altered police report” from June 2015 from Putnam County’s sheriff’s office that appeared to detail domestic abuse accusations against Gentile, according to the suit.

No charges related to the police report were ever filed and Gentile has denied them. But Cohodes soon began tagging Gentile as a “wife beater” on Twitter, even as he alleged securities regulators were investigating Gentile.

“How are they going to pay off their debt?” Cohodes asked about Lennett on May 7. “Maybe you should ask the Wife Beater.” Five days later, he wrote to Gentile, “I will bring you a lemon cake in prison.”

Lennett shares tanked.

For his part, Gentile appears to have blocked Cohodes, but on June 5, he taunted him on Twitter by Photoshopping his head onto a picture of a cheerleader, ridiculing Cohodes’ investment in another company.

Gentile, who owns a Bahamas-based brokerage, got picked up by the FBI in 2007 for an alleged pump-and-dump scheme. In 2012, however, he agreed to become a confidential informant, helping land numerous fraudsters in jail.

The FBI tried to put Gentile in prison, too, but he refused, saying that it had breached a cooperation agreement — and produced hundreds of secret recordings with FBI agents to back up his case. The FBI’s case, as well as a related civil case from the SEC, was later dismissed.

“Marc Cohodes is a clown,” Gentile told The Post. “But he’s a dangerous one.”

Cohodes’ lawyer, Fred Norton, said the suit is without merit but had no comment on any specific allegations. Cohodes declined to comment.