South Carolina Gov. Henry McMaster prevailed in the Republican primary for a chance to win a full term, vindicating his ally President Trump along the way.

“They will say Donald Trump suffered a major, major defeat in the great state of South Carolina, it was a humiliating defeat for Donald Trump, so please get your asses out tomorrow and vote,” Trump warned South Carolina Republicans in a rally for McMaster Monday night.

[Related: Trump takes victory lap after Dan Donovan, Henry McMaster win respective primaries]

Forced into a runoff by first-time candidate John Warren, McMaster helped Trump avert that outcome. Warren, 39, campaigned against the 71-year-old McMaster as a creature of the state’s corrupt political establishment — or, as Trump might put it, “the swamp.”

McMaster, one of the highest-profile South Carolina GOP elected officials to support Trump in the state’s primary in 2016, became governor when the president tapped Nikki Haley to serve as U.S. ambassador to the United Nations.

Since Haley assumed the post, McMaster has served as governor for the past 17 months. Trump has a mixed record with endorsements in Republican primaries. The president backed Sen. Luther Strange, R-Ala., who lost to controversial judge Roy Moore. But he was able to help defeat Don Blankenship in West Virginia’s senatorial primary earlier this year.

Trump’s 11th-hour endorsement of state Rep. Katie Arrington helped her beat Rep. Mark Sanford, R-S.C., in a primary earlier this month. The president has since taken pleasure at pointing out Sanford’s electoral fate.

Trump-endorsed Republicans fared well Tuesday night. The president's choice in a Staten Island congressional primary, New York Rep. Dan Donovan, won in a landslide, fending off former Rep. Michael Grimm. Even erstwhile Never Trumper Mitt Romney, the Republican senatorial primary winner in Utah, had the president's stamp of approval.