But, because Mr. Trump’s Cuba announcement will alienate the United States from the very coalition of allied countries that we need to stay united on Venezuela, his real goal appears to be something else: stoking his base. That’s why Mr. Trump trumpets the bogus threat of Venezuelan-style “socialism” invading America through the Democratic Party. Similarly, he periodically threatens military intervention in Venezuela, which is music to the ears of many exiles in South Florida. Despite what Mr. Trump says, there is no practical military option for deposing Mr. Maduro. Bombing Caracas would kill countless innocents and a ground invasion would meet determined resistance from the Venezuelan military.

Rather, if the president were truly serious about helping Venezuelans, he would grant the many thousands now in the United States temporary protected status, allowing them to remain here safely until conditions improve in Venezuela. But extending such status would anger another, much wider swath of Mr. Trump’s base: anti-immigrant voters in every state who applaud Mr. Trump’s efforts to rid the country of brown and black people. Mr. Trump can hardly grant Venezuelans temporary status after he has methodically tried to strip so many other groups of the same protections.

Playing to these same die-hard supporters is also the only explanation for the president’s most ill-conceived, counterproductive policy toward the Western Hemisphere. Against the counsel of his own advisers and many Republicans in Congress, Mr. Trump recently announced that he is ending all assistance to Guatemala, Honduras and El Salvador — the three Northern Triangle countries sending the majority of migrants to the American border — ostensibly to punish them for failing to stop the outflow.

Large numbers of families are indeed fleeing those countries, which suffer among the highest rates of violence in the world, to seek asylum in overwhelming numbers at our southern border. The $450 million in assistance the United States provides each year, mainly to nongovernment groups in the Northern Triangle, has demonstrated success in reducing gang activity, crime and corruption — the very things that push asylum-seekers north.

By halting assistance, Mr. Trump is decimating an effective, bipartisan Obama-era initiative and catalyzing an even greater flow of migrants to the United States. This is antithetical to American interests. But an epic crush of migrants at the border might make Mr. Trump’s apocalyptic rhetoric and policies seem more justified and help him whip the Republican political base into what is now their reliably biennial anti-immigrant frenzy.

Plenty of presidents before Mr. Trump have made serious, sometimes catastrophic foreign policy mistakes; but, few, if any, decided almost every aspect of foreign policy on the basis of what would help him get re-elected. Our previous commanders-in-chief conducted policy to advance their vision of the national interest. And until recently, we had two parties in Congress that mostly put country first.

No longer. The Republican Party has largely abdicated its responsibilities in favor of the whims of a president guided solely by personal and political interests, even in executing the most sacred and solemn duty of the office — to keep America safe.

The Times is committed to publishing a diversity of letters to the editor. We’d like to hear what you think about this or any of our articles. Here are some tips. And here’s our email: letters@nytimes.com.

Follow The New York Times Opinion section on Facebook, Twitter (@NYTopinion) and Instagram.