The most surprising thing about President Trump’s decision to overrule his top advisers and withdraw U.S. forces from Syria and Afghanistan isn’t that it was improvised and disruptive. Sudden shifts are part of Mr. Trump’s method, and disconcerting senior officials is one of his favorite management tools.

The surprise is that for the first time, Mr. Trump made a foreign-policy decision that divides the coalition that brought him into the White House and risks his control of the GOP. Mr. Trump has frequently challenged and infuriated his political opponents, but his Syria decision risks alienating allies he can ill afford to lose.

Mr. Trump’s greatest political asset has been his feel for the priorities of his populist base. The importance of this skill is sometimes underrated, but his ability to unite and energize his voters gave him control of the Republican Party and the White House. If he loses his bond with the base, he will quickly find himself isolated in a Washington that loathes him.

Nowhere has Mr. Trump’s sense of populist America been more important than in foreign policy. As a candidate in 2015-16, he showed that he understood something his establishment rivals in both parties did not: that the post-Cold War consensus no longer commanded the American people’s support.

During the Cold War, a large majority of Americans united around the policies that built the international liberal order after World War II. But when the Soviet Union collapsed, a gap opened between those who saw an opportunity to expand America’s world-building activities and those who saw an opportunity for the U.S. to reduce its commitments overseas. The foreign-policy establishment across both parties supported an ambitious global agenda, but increasingly alienated populists preferred to pull back.

For a quarter-century after the Soviet Union collapsed, the establishment consensus for building up the global order dominated American foreign policy, and dissenting voices were shunted aside. By 2016, that was no longer possible. In the Republican Party, Trump’s antiestablishment message led him to victory; on the Democratic side, Sen. Bernie Sanders’s campaign also benefited from opposition to establishment policies on security and trade.

The conservative opposition to conventional American foreign policy is anything but monolithic. One group of critics continues the Jeffersonian tradition of preserving American liberties at home by minimizing American involvement abroad. Figures like Sen. Rand Paul and his father, former Rep. Ron Paul, speak to this side of the populist coalition. Jeffersonians are skeptical of international institutions and alliances as well as American interventions to protect human rights abroad. They oppose big defense budgets and extensive military deployments and see no reason for an anti-Russia foreign policy. Many believe that Israel seeks to drag the U.S. into Middle East struggles that Washington would do better to avoid. Sen. Paul was quick to announce his support for President Trump’s Syria decision.

The other, Jacksonian wing of conservative populism shares the Jeffersonian suspicion of multilateralism and humanitarian interventions, but is more supportive of the American military and of maintaining America’s reputation for standing by allies. Jacksonians are hawkish about China, Russia and Iran and favor a strong relationship with Israel. This tendency in American politics is represented by figures like Sen. Tom Cotton, a U.S. Army veteran who served in both Afghanistan and Iraq and has criticized Mr. Trump’s Syria decision.

Mr. Trump’s beleaguered presidency needs both Jeffersonian and Jacksonian support to survive, and until the Syria decision, he had managed the tension between the two currents pretty effectively. Both Jacksonians and Jeffersonians supported the withdrawal from the Paris climate accord, and both hailed the president’s skepticism about humanitarian intervention. Both sides enjoyed the discomfiture of the foreign-policy establishment when Mr. Trump challenged conventional wisdom, and both praised his willingness to pursue a more unilateral course in foreign affairs.

That harmony may soon sour. Mr. Trump’s decisions on Syria and Afghanistan risk a rift between the president and his Jacksonian supporters and provide a way for some in the GOP to break with the president without losing their own populist credentials. The betrayal of the Kurds, the benefits to Iran of American withdrawal, the tilt toward an Islamist and anti-Israel Turkey, and the purrs of satisfaction emanating from the Kremlin are all bitter pills for Jacksonians to swallow.

Of the two wings of the GOP populist movement, the Jacksonians are the stronger and, from a political standpoint, the more essential. The GOP base is more hawkish than isolationist, and from jihadist terrorism to Russian and Chinese revisionism, today’s world is full of threats that alarm Jacksonian populists and lead them to support a strong military and a forward-leaning foreign policy.

Neoconservatives tried and failed to rally GOP foreign-policy hawks against Donald Trump. Should Jacksonians turn against him, they are likely to pose a much more formidable threat.