President Donald Trump wants to bring American troops home from Syria and Afghanistan. But Trump doesn’t want to look weak. To keep up his tough-guy act and satisfy his base, he wants to deploy troops on our southern border, where he claims they’ll stop terrorists, deter illegal immigrants, and help build a wall. Trump thinks he can shift American militarism from the Muslim world to Mexico without paying a political price. But a fellow Republican, Sen. Lindsey Graham of South Carolina, is trying to wreck Trump’s plan. Graham, who supports the border wall, is using that issue to pummel the president for pulling out of Syria and Afghanistan.

Trump says ISIS is finished. “We have defeated ISIS in Syria,” he tweeted on Wednesday. It’s time to leave Syria to Russia and Iran, the president argues, and defend our own borders for a change. “Our great Military” is doing a “great job … on our Southern Border,” Trump declared on Thursday. Now the president has another mission in mind: “Because of the tremendous dangers at the Border, including large scale criminal and drug inflow, the United States Military will build the Wall!”

Trump wants Americans to think of the southern border as a war zone, with “thousands of innocent lives” lost every year to “criminal organizations” and “massive drug inflow.” The real terror threat, he falsely asserted in a speech on Thursday at the White House, isn’t in the Middle East; it’s at home, where “every day, 10 known or suspected terrorists try to gain entry into our country.” Democrats who oppose a border wall are weakening America in the face of this enemy, said the president: “The Democrats continue to oppose border security, no matter how many innocent people get hurt or die.”

Politically, this is an ambitious scheme. Trump is trying to frame a budget fight over a wall—a wall between the United States and a friendly country—as our most important national security issue. Important enough, in his view, to shut down the government if Congress won’t pay for the wall. “Any measure that funds the government must include border security,” the president demanded on Thursday, “for the safety of our community.”

That argument is a tough sell. Trump is wrong on the facts: Undocumented immigrants are less likely to commit crimes than native-born Americans. He’s also on the wrong side of polls: Most Americans don’t want a wall and don’t think it’s worth shutting down the government. But the president’s biggest problem is that the places from which he’s withdrawing troops—the Middle East and southwest Asia—pose a far bigger terror threat than does any country south of our border. And Graham has decided to drive that point home at Trump’s expense.

In speeches, press conferences, TV interviews, and tweets, Graham is accusing the president of ignoring his military commanders and national security officials. Graham calls the Syria pullout a “big win” for Russia—“They are ECSTATIC,” he tweeted on Thursday—and a “sign of American weakness” to Iran and North Korea. At a press conference that day, Graham charged that the pullout was “akin to surrendering.”

Withdrawing from Syria is like “tearing down a wall” that’s protecting us from terrorists, Graham declared.

Trump isn’t just fleeing the battlefield, according to Graham. He’s endangering the United States. The Afghan branch of ISIS poses “a direct threat to our homeland,” has “the United States in their target sets,” and “is plotting to hit America,” Graham warned the president. If Trump withdraws troops, said Graham, “We are setting in motion the loss of all our gains and paving the way toward a second 9/11.”

Graham doesn’t just challenge Trump’s seriousness on terrorism. He takes direct aim at the president’s political strategy, arguing that the pullouts make a mockery of Trump’s tough talk about the border. Withdrawing from Syria is like “tearing down a wall” that’s protecting us from terrorists, Graham declared Thursday on CNN. On Twitter, he roasted Trump: “Outsourcing our national security and the fight against ISIS to Russia, Iran, and Assad/Syria … will result in an Open Borders policy for ISIS.”

Graham’s attacks have stung Trump. On Thursday, the president tweeted back at Graham, saying it was “time to focus on our Country & bring our youth back home.” On Friday, Trump bristled at the suggestion that he was surrendering the Middle East to Russia. “There has never been a president who has been tougher (but fair) on China or Russia,” he tweeted.

Trump has the power of the presidency in this fight, but Graham has the stronger ground politically. The senator is directly undercutting the president’s attempt to change the subject from Syria and Afghanistan to Mexico. Moreover, when you pull troops out of a country full of terrorists, Americans soon forget about the bloodshed you avoided. Instead, you get blamed for the next terror attack at home. And Graham’s televised warning about a second 9/11 is handy material for Democrats and journalists in the event of a major jihadi strike on the United States.

Graham also has an advantage because of the way Trump has framed the fight over the border wall. Having promised that Mexico would pay for the wall, Trump now extols Mexico as a buffer and ally in blocking illegal immigration from Central America. In fact, the White House is using that relationship as a cudgel against Democrats. “It’s a sad day in America when the Mexican government is doing more to protect our borders and stop the illegal flow of drugs, human trafficking, and terrorists across our borders than Senate Democrats are willing to do,” White House Press Secretary Sarah Huckabee Sanders sniped Friday morning on Fox and Friends.

That’s an invitation to turn the question back to Syria and Afghanistan. If buffers and allies are important in protecting us from nonlethal threats to the south, aren’t they also important in protecting us from lethal threats to the east? Isn’t the military better suited to fighting terrorists than to constructing a wall against civilians? Isn’t Graham right that an abrupt withdrawal from Syria and Afghanistan makes Trump’s bluster about a border wall—which Graham otherwise supports—a joke?

Graham can’t stop the pullout. But politically, he can make it hurt the president. On Friday, Graham told reporters that he’s calling for hearings “right now” to debunk Trump’s rosy portrayal of the situation in Syria. Graham intends to summon as one of his witnesses Defense Secretary James Mattis, who announced on Thursday that he’s resigning to protest the troop withdrawals. On Saturday, the New York Times reported that Brett McGurk, Trump’s special envoy to the anti-ISIS coalition in Syria, is also resigning in protest. “I could not carry out these new instructions and maintain my integrity,” McGurk said of the pullout order. The firefight over Syria and Afghanistan has moved inside Trump’s country, inside his party, and inside his administration. There’s no wall the president can hide behind.