If a successful State of the Union address inspires your side to clap enthusiastically while making it difficult for your opponents not to join in, Trump’s was a success. It contained many lies, of course. And it falsely and viciously equated undocumented immigration with murder, as usual. But it offered a preview of how Trump, despite his unpopularity, could campaign effectively in 2020.

In 2016, Trump amended traditional Republican ideology in several key ways: He foregrounded his opposition to immigration, he de-emphasized cutting Social Security and Medicare, he attacked free trade, and he promised to end costly wars. In so doing, he jettisoned parts of the GOP agenda—free trade, entitlement reform, and an interventionist foreign policy—that enjoyed support among party elites but few ordinary voters. And by emphasizing immigration and trade while holding fast to the cultural agenda of the Christian right, he roused the GOP’s white, working-class base. This strategy helped him perform far better than most commentators expected when the general election began.

In Trump’s first two speeches to Congress, he deviated from this formula. In 2017, he spoke at length about his plans to repeal and replace Obamacare, a political loser. While Trump’s voters loathe Barack Obama, most Americans in both parties want to preserve the health-care protections he signed into law. In his State of the Union address last year, Trump hyped the tax cut he had signed the previous December. But that, too, was unpopular. Like the Obamacare repeal, upper-income tax cuts are a generic GOP cause that Trump had not placed at the center of his 2016 run. Both issues highlighted a core GOP weakness—the perception that it champions the rich at the expense of other Americans—which Trump had somewhat obscured during the campaign.

This year, Trump returned to the formula that helped win him the presidency. He emphasized immigration, which more than anything else binds him to his base. And he mentioned “late-term abortion,” which helps him shore up support on the Christian right. But he also refocused on issues that in 2016 helpfully distinguished him from his Republican predecessors. He devoted more of his speech to trade than he had in 2017 or 2018, and he took particular aim at China, which was politically shrewd. When he declared, “We are now making it clear to China that after years of targeting our industries and stealing our intellectual property, the theft of American jobs and wealth has come to an end,” even Nancy Pelosi and many Democrats stood up and cheered.

Trump also reprised another 2016 theme that was largely absent from his last two addresses to Congress: military nonintervention. In so doing, he both reasserted his distance from an unpopular party establishment and drew on the strengths that he enjoys as a Republican. Just days ago, Republican senators voted overwhelmingly to rebuke Trump for his plans to withdraw U.S. troops from Syria and Afghanistan. But in his speech, Trump doubled down, declaring that “as we work with our allies to destroy the remnants of ISIS, it is time to give our brave warriors in Syria a warm welcome home” and that in Afghanistan, “the hour has come to at least try for peace.”

Were Trump a Democrat, such moves might be politically dangerous. The Syria withdrawal can easily be compared to Obama’s troop withdrawal from Iraq, which many Republicans blame for the rise of ISIS. And the deal Trump’s administration is negotiating with the Taliban—which looks mostly like a fig leaf to allow the United States to abandon the Afghan government it has been protecting for close to two decades—evokes America’s abandonment of South Vietnam.

But Trump knows that, as a Republican, he is largely insulated from the charges of surrender that would plague a Democrat who made similar moves. And he knows that while the Republican foreign-policy class may grumble, leaving Syria and Afghanistan is popular among the rank-and file voters of both parties. When Trump declared, “Great nations do not fight endless wars,” Pelosi rose again, as did most Democrats and Republicans in the hall. This is Trump’s Nixon in China, and absent some disaster, it will serve him well in his reelection bid.

The final element of Trump’s speech that seems likely to reappear frequently in 2020 was his use of Venezuela’s plight as a springboard from which to denounce “socialism.” It was another crafty move. Many of the policy proposals that Democrats have embraced as they have moved left—higher taxes on the rich, Medicare for all, free college, and a $15 national minimum wage—are popular. In the post–Cold War era, politicians such as Bernie Sanders have also improved socialism’s image by linking it to benign Nordic countries such as Sweden and Denmark rather than the Soviet Union.

By citing Venezuela, Trump counters that. He turns an economic debate into a cultural one. He makes “socialism” a byword for the left’s supposed effort to turn America into a developing-world, nonwhite country. And thus, rather than risking his supporters being wooed by Democrats offering populist economic proposals, he again stokes their fears that Democrats will make America unrecognizable.

Is this race-baiting political spin good for the country? Of course not. As policy, Trump’s new State of the Union address—like virtually all his speeches—is a national embarrassment. But as politics, it shows why Trump, for all his self-inflicted wounds, cannot be counted out.

The fact that Republicans no longer possess a majority in both houses of Congress, and thus can’t pass legislation—such as upper-income tax cuts and the repeal of Obamacare—that party elites demand, probably helps Trump. It frees him to focus on rebuilding the heterodox image that helped him in 2016. If Trump’s third address to Congress marked the launch of his reelection campaign, he’s off to a pretty good start.