WEST COLUMBIA, S.C. — President Trump pleaded Monday night with South Carolina Republicans to vote for Gov. Henry McMaster in a runoff election on Tuesday, warning conservatives that if the governor lost, his failure would be pinned on the president they came to see.

Rallying a cozy high school gymnasium full of supporters for one of his earliest, high-profile backers, Mr. Trump said the news media would portray a McMaster defeat as a sign of his own weakness.

“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,” he said to applause.

Mr. McMaster failed to win a majority of the vote in the Republican primary this month and is locked in a competitive race with John Warren, a first-time candidate and former Marine. Mr. Warren, 39, entered the campaign late, but gained momentum with a series of attacks linking Mr. McMaster, 71, to the political status quo in a state capital that has been besieged by a sprawling corruption investigation.