President Donald Trump on Wednesday weighed in on an obscure piece of legislation granting rights to a Native American tribe seeking a casino in Massachusetts. And he did so while taking a jab at potential Democratic 2020 rival Sen. Elizabeth Warren (D-MA), whom he dubbed “Pocahontas” and who has supported previous versions of the legislation.

Trump’s attack on Warren is old hat. His engagement on the casino legislation, however, was a seemingly random aside from his usual twitter fare of deriding congressional investigations into his administration and unflattering media coverage of his business.

But it may not have been random at all. At least two Trump-connected firms were hired this year to lobby on behalf of Twin River Management Group, which owns a casino in Rhode Island that would directly compete with one planned by the Mashpee Wampanoag. The tribe needs Congress to enshrine its tribal rights in order to rescue the troubled casino deal in nearby Taunton, Massachusetts.

One of those those firms is run by Trump adviser Matt Schlapp, who has, since January, been lobbying Congress and the White House. Twin River has paid his firm, Cove Strategies, $30,000 for its work so far this year.

Schlapp, who is also the husband of White House strategic communications director Mercedes Schlapp, has publicly criticized legislation to recognize the tribe and he too has done so by invoking Warren.

“Soon full House will vote to reward Sen Elizabeth Warren with...wait for it...an INDIAN casino in Massachusetts,” he tweeted on Wednesday morning, as the House prepared to take up the Mashpee Wampanoag Tribal Reservation Restoration Act.

An hour later, Trump chimed in on Twitter as well. “Republicans shouldn’t vote for H.R. 312, a special interest casino Bill, backed by Elizabeth (Pocahontas) Warren,” he wrote. “It is unfair and doesn’t treat Native Americans equally!”

Their opposition has been successful, at least for now. On Wednesday afternoon, in the wake of the president’s tweet, House Democrats pulled the bill from the floor.

Rep. Bill Keating (D-MA), the bill’s sponsor, blamed Trump’s intervention—and Schlapp’s likely encouragement of it—for the setback. “There's no question of his intervention through tweet, where that came from,” Keating said in an interview. “They didn’t even do a good job hiding it.”

It was a major legislative victory for Schlapp, and the bill’s supporters quickly pointed the finger directly at the Trump adviser. “I'm sure this racist lie has nothing to do with the fact that Matt Schlapp - Trump's staffer's husband - is lobbying against the bill,” tweeted Rep. Ruben Gallego (D-AZ), quoting the president’s statement about Warren.

Schlapp didn’t respond to questions about his lobbying of the White House or whether he discussed the issue with the president directly. In a statement on Twitter Wednesday evening, Schlapp said he had nothing to do with the president's tweet.

The White House did not immediately return a request for comment either.

Schlapp is not the only prominent Trumpworld figure lobbying against the Mashpee Wampanoag bill on Twin River’s behalf. A few days before the company hired Schlapp’s Cove Strategies, it also brought on the firm Black Diamond Strategies, which assigned Doug Davenport, a Trump 2016 campaign adviser, to work on the account. Black Diamond’s principals also include former Trump campaign hand Rick Wiley and former Rep. Connie Mack (R-FL), a Trump administration ally. Black Diamond was also paid $30,000 during the first quarter of 2019.

The Mashpee Wampanoag tribe has a checkered history in Washington. It needs congressional sign-off on its tribal status because the Interior Department dealt a blow to its federal tribal recognition last year, imperiling its Taunton casino plans. The Mashpee Wampanoag only received tribal recognition status in 2007, in part as a result of lobbying by disgraced influence-peddler Jack Abramoff.

Schlapp is lobbying on the other end of the spectrum, opposing designation of the Mashpee Wampanoag as a federally recognized tribe. And he’s done so as another group he runs, the American Conservative Union, made a show of its support for tribal rights.

In February, at ACU’s annual Conservative Political Action Conference, the group hosted a panel discussion dubbed, “All Nations, One America: Why Conservatives Should Support Tribal Sovereignty.”