CHARLES KOCH (pronounced “coke”) and his brother David have built one of America’s most powerful political machines. The donor network they founded is one of the most influential groups in conservative politics, rivalling the Republican National Committee. Earlier this year it said it planned to spend $400m in the mid-terms to help preserve the Republican majority in both Congressional chambers. But that did not stop President Donald Trump giving the billionaire brothers an astonishingly insulting ticking off this week.

“Charles Koch of Koch Brothers, who claims to be giving away millions of dollars to politicians even though I know very few who have seen this (?), now makes the ridiculous statement that what President Trump is doing is unfair to 'foreign workers'” the president tweeted on August 2nd. “He is correct, AMERICA FIRST!”

It was unclear exactly what statement the president had in mind, but it followed a pair of equally rude tweets earlier in the week, in which Mr Trump called the brothers “totally overrated” and “a total joke in Republican circles”. He had never, he said, looked for their support, because he didn’t need it. “Two nice guys with bad ideas. Make America great again!”

Charles Koch and his brother David, who earlier this year stepped down from his work in politics and Koch Industries, an oil, gas and commodities conglomerate that is America’s second biggest private company, set up the network to oppose steel tariffs and increased federal spending under George W. Bush. They are the free-trade heavyweights of the Republican Party. To them, Mr Trump’s economic nationalism and hatred of free trade is anathema. They did not endorse his presidential run. Since he became president, they have approved many of his policies, including big tax cuts, deregulation and a raft of conservative judicial nominations; their network is pushing hard for Brett Kavanaugh’s confirmation as a Supreme Court justice, for example. But they appear to be much more concerned about the trade war Mr Trump is threatening. And ahead of crucial mid-terms in November, in which the Republicans’ slim majorities in both houses of Congress are imperiled, the ideological gulf this represents has become dangerous for the Republican Party.

Last weekend, during the network’s annual retreat in Colorado Springs, Charles Koch denounced a “rise in protectionism” which was “perverting the key institutions of our society”. While he avoided specific mention of Mr Trump, he and his aides also denounced the $1.3 trillion spending bill—the biggest spending plan in history—and the administration’s recent $12b in emergency aid to farmers. They also threatened to withhold support for Republican candidates who did not endorse the sort of free trade, small government policies the network exists to promote. Mr Koch didn’t mind too much about party affiliation, he told reporters, and regretted his past support for Republicans who had not stood up for the principles he espouses. He suggested he would be willing to work with Democrats on some issues, including criminal justice reform, if they won a majority in the House of Representatives in November.

Mr Koch’s distaste for the Trump administration may make that outcome more likely. On July 30th, less than 100 days before the mid-term elections, Americans for Prosperity (AFP), the network’s grass-roots political organisation, said it would not support Kevin Cramer, a Republican, in his bid to unseat Senator Heidi Heitkamp, a Democrat. The race in North Dakota is one of the most competitive of the mid-terms races. It is also one of the most crucial: it could decide the balance of power in the Senate. But Mr Cramer was “inconsistent” on a number of important issues, such as government spending and free trade, the president of AFP said.

Though it has so far only singled out Mr Cramer, the Koch network suggested it would strategically withhold support for Republicans in other important races too. At its retreat it released a list of the states with Senate races it was backing: Florida, Missouri Tennessee and Wisconsin. The list did not include Indiana, where Mike Braun, a Republican businessman, is taking on Senator Joe Donnelly, the Democratic incumbent. Mr Braun has praised Mr Trump’s tariffs.

What could this mean for Republicans’ prospects in the mid-terms? A Koch endorsement is followed by on-the-ground support from AFP, which was established to empower the conservative grass roots, and does so effectively. In a close race that could make all the difference.

“I know this is uncomfortable. It was uncomfortable for me, too,” Emily Seidel, Americans for Prosperity’s chief executive, reportedly told donors. “The fact that we’re willing to do this during an election year shows everyone that we’re dead serious.”